зеркало из https://github.com/microsoft/clang.git
Pass postfix attributes to ActOnFields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56992 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
29471a1341
Коммит
1bfe1c2129
|
@ -205,7 +205,8 @@ namespace {
|
|||
|
||||
virtual void ActOnFields(Scope* S, SourceLocation RecLoc, DeclTy *TagDecl,
|
||||
DeclTy **Fields, unsigned NumFields,
|
||||
SourceLocation LBrac, SourceLocation RBrac) {
|
||||
SourceLocation LBrac, SourceLocation RBrac,
|
||||
AttributeList *AttrList) {
|
||||
llvm::cout << __FUNCTION__ << "\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -492,6 +492,8 @@ ASTContext::getASTObjCInterfaceLayout(const ObjCInterfaceDecl *D) {
|
|||
/// specified record (struct/union/class), which indicates its size and field
|
||||
/// position information.
|
||||
const ASTRecordLayout &ASTContext::getASTRecordLayout(const RecordDecl *D) {
|
||||
fprintf(stderr, "%p\n", D->getAttr<PackedAttr>());
|
||||
|
||||
D = D->getDefinition(*this);
|
||||
assert(D && "Cannot get layout of forward declarations!");
|
||||
|
||||
|
|
|
@ -764,14 +764,15 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc,
|
|||
|
||||
SourceLocation RBraceLoc = MatchRHSPunctuation(tok::r_brace, LBraceLoc);
|
||||
|
||||
Actions.ActOnFields(CurScope,
|
||||
RecordLoc,TagDecl,&FieldDecls[0],FieldDecls.size(),
|
||||
LBraceLoc, RBraceLoc);
|
||||
|
||||
AttributeList *AttrList = 0;
|
||||
// If attributes exist after struct contents, parse them.
|
||||
if (Tok.is(tok::kw___attribute))
|
||||
AttrList = ParseAttributes(); // FIXME: where should I put them?
|
||||
|
||||
Actions.ActOnFields(CurScope,
|
||||
RecordLoc,TagDecl,&FieldDecls[0],FieldDecls.size(),
|
||||
LBraceLoc, RBraceLoc,
|
||||
AttrList);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -900,7 +900,7 @@ void Parser::ParseObjCClassInstanceVariables(DeclTy *interfaceDecl,
|
|||
// for code rewriting tools that need to be aware of the empty list.
|
||||
Actions.ActOnFields(CurScope, atLoc, interfaceDecl,
|
||||
&AllIvarDecls[0], AllIvarDecls.size(),
|
||||
LBraceLoc, RBraceLoc);
|
||||
LBraceLoc, RBraceLoc, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -282,7 +282,8 @@ private:
|
|||
virtual void ActOnFields(Scope* S,
|
||||
SourceLocation RecLoc, DeclTy *TagDecl,
|
||||
DeclTy **Fields, unsigned NumFields,
|
||||
SourceLocation LBrac, SourceLocation RBrac);
|
||||
SourceLocation LBrac, SourceLocation RBrac,
|
||||
AttributeList *AttrList);
|
||||
virtual DeclTy *ActOnEnumConstant(Scope *S, DeclTy *EnumDecl,
|
||||
DeclTy *LastEnumConstant,
|
||||
SourceLocation IdLoc, IdentifierInfo *Id,
|
||||
|
|
|
@ -2111,7 +2111,8 @@ Sema::DeclTy *Sema::ActOnIvar(Scope *S,
|
|||
void Sema::ActOnFields(Scope* S,
|
||||
SourceLocation RecLoc, DeclTy *RecDecl,
|
||||
DeclTy **Fields, unsigned NumFields,
|
||||
SourceLocation LBrac, SourceLocation RBrac) {
|
||||
SourceLocation LBrac, SourceLocation RBrac,
|
||||
AttributeList *Attrs) {
|
||||
Decl *EnclosingDecl = static_cast<Decl*>(RecDecl);
|
||||
assert(EnclosingDecl && "missing record or interface decl");
|
||||
RecordDecl *Record = dyn_cast<RecordDecl>(EnclosingDecl);
|
||||
|
|
|
@ -461,7 +461,7 @@ void Sema::ActOnFinishCXXMemberSpecification(Scope* S, SourceLocation RLoc,
|
|||
SourceLocation RBrac) {
|
||||
ActOnFields(S, RLoc, TagDecl,
|
||||
(DeclTy**)FieldCollector->getCurFields(),
|
||||
FieldCollector->getCurNumFields(), LBrac, RBrac);
|
||||
FieldCollector->getCurNumFields(), LBrac, RBrac, 0);
|
||||
}
|
||||
|
||||
void Sema::ActOnFinishCXXClassDef(DeclTy *D) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче