Pass the right brace SourceLocation from the Parser to the TagDecls.
llvm-svn: 75591
This commit is contained in:
parent
575fa05991
commit
23e1f1d6be
|
@ -455,7 +455,8 @@ public:
|
|||
|
||||
/// ActOnTagFinishDefinition - Invoked once we have finished parsing
|
||||
/// the definition of a tag (enumeration, class, struct, or union).
|
||||
virtual void ActOnTagFinishDefinition(Scope *S, DeclPtrTy TagDecl) { }
|
||||
virtual void ActOnTagFinishDefinition(Scope *S, DeclPtrTy TagDecl,
|
||||
SourceLocation RBraceLoc) { }
|
||||
|
||||
virtual DeclPtrTy ActOnEnumConstant(Scope *S, DeclPtrTy EnumDecl,
|
||||
DeclPtrTy LastEnumConstant,
|
||||
|
|
|
@ -1500,7 +1500,7 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc,
|
|||
LBraceLoc, RBraceLoc,
|
||||
AttrList);
|
||||
StructScope.Exit();
|
||||
Actions.ActOnTagFinishDefinition(CurScope, TagDecl);
|
||||
Actions.ActOnTagFinishDefinition(CurScope, TagDecl, RBraceLoc);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1656,7 +1656,7 @@ void Parser::ParseEnumBody(SourceLocation StartLoc, DeclPtrTy EnumDecl) {
|
|||
AttrList = ParseAttributes(); // FIXME: where do they do?
|
||||
|
||||
EnumScope.Exit();
|
||||
Actions.ActOnTagFinishDefinition(CurScope, EnumDecl);
|
||||
Actions.ActOnTagFinishDefinition(CurScope, EnumDecl, RBraceLoc);
|
||||
}
|
||||
|
||||
/// isTypeSpecifierQualifier - Return true if the current token could be the
|
||||
|
|
|
@ -1213,7 +1213,7 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc,
|
|||
ParsingDef.Pop();
|
||||
ClassScope.Exit();
|
||||
|
||||
Actions.ActOnTagFinishDefinition(CurScope, TagDecl);
|
||||
Actions.ActOnTagFinishDefinition(CurScope, TagDecl, RBraceLoc);
|
||||
}
|
||||
|
||||
/// ParseConstructorInitializer - Parse a C++ constructor initializer,
|
||||
|
|
|
@ -563,7 +563,8 @@ public:
|
|||
|
||||
/// ActOnTagFinishDefinition - Invoked once we have finished parsing
|
||||
/// the definition of a tag (enumeration, class, struct, or union).
|
||||
virtual void ActOnTagFinishDefinition(Scope *S, DeclPtrTy TagDecl);
|
||||
virtual void ActOnTagFinishDefinition(Scope *S, DeclPtrTy TagDecl,
|
||||
SourceLocation RBraceLoc);
|
||||
|
||||
EnumConstantDecl *CheckEnumConstant(EnumDecl *Enum,
|
||||
EnumConstantDecl *LastEnumConst,
|
||||
|
|
|
@ -3830,9 +3830,11 @@ void Sema::ActOnTagStartDefinition(Scope *S, DeclPtrTy TagD) {
|
|||
}
|
||||
}
|
||||
|
||||
void Sema::ActOnTagFinishDefinition(Scope *S, DeclPtrTy TagD) {
|
||||
void Sema::ActOnTagFinishDefinition(Scope *S, DeclPtrTy TagD,
|
||||
SourceLocation RBraceLoc) {
|
||||
AdjustDeclIfTemplate(TagD);
|
||||
TagDecl *Tag = cast<TagDecl>(TagD.getAs<Decl>());
|
||||
Tag->setRBraceLoc(RBraceLoc);
|
||||
|
||||
if (isa<CXXRecordDecl>(Tag))
|
||||
FieldCollector->FinishClass();
|
||||
|
|
Loading…
Reference in New Issue