Skip to content

[clang][Sema] Rename ActOnIVar parameter #66181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions clang/include/clang/Sema/Sema.h
Original file line number Diff line number Diff line change
Expand Up @@ -3499,9 +3499,8 @@ class Sema final {

void ActOnLastBitfield(SourceLocation DeclStart,
SmallVectorImpl<Decl *> &AllIvarDecls);
Decl *ActOnIvar(Scope *S, SourceLocation DeclStart,
Declarator &D, Expr *BitfieldWidth,
tok::ObjCKeywordKind visibility);
Decl *ActOnIvar(Scope *S, SourceLocation DeclStart, Declarator &D,
Expr *BitWidth, tok::ObjCKeywordKind visibility);

// This is used for both record definitions and ObjC interface declarations.
void ActOnFields(Scope *S, SourceLocation RecLoc, Decl *TagDecl,
Expand Down
12 changes: 4 additions & 8 deletions clang/lib/Sema/SemaDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18556,13 +18556,10 @@ TranslateIvarVisibility(tok::ObjCKeywordKind ivarVisibility) {

/// ActOnIvar - Each ivar field of an objective-c class is passed into this
/// in order to create an IvarDecl object for it.
Decl *Sema::ActOnIvar(Scope *S,
SourceLocation DeclStart,
Declarator &D, Expr *BitfieldWidth,
tok::ObjCKeywordKind Visibility) {
Decl *Sema::ActOnIvar(Scope *S, SourceLocation DeclStart, Declarator &D,
Expr *BitWidth, tok::ObjCKeywordKind Visibility) {

IdentifierInfo *II = D.getIdentifier();
Expr *BitWidth = (Expr*)BitfieldWidth;
SourceLocation Loc = DeclStart;
if (II) Loc = D.getIdentifierLoc();

Expand Down Expand Up @@ -18625,9 +18622,8 @@ Decl *Sema::ActOnIvar(Scope *S,
}

// Construct the decl.
ObjCIvarDecl *NewID = ObjCIvarDecl::Create(Context, EnclosingContext,
DeclStart, Loc, II, T,
TInfo, ac, (Expr *)BitfieldWidth);
ObjCIvarDecl *NewID = ObjCIvarDecl::Create(
Context, EnclosingContext, DeclStart, Loc, II, T, TInfo, ac, BitWidth);

if (II) {
NamedDecl *PrevDecl = LookupSingleName(S, II, Loc, LookupMemberName,
Expand Down