diff options
author | DeLesley Hutchins <delesley@google.com> | 2012-03-02 22:12:59 +0000 |
---|---|---|
committer | DeLesley Hutchins <delesley@google.com> | 2012-03-02 22:12:59 +0000 |
commit | 2287c5e2352fc51cd74e8a9a7725cbf87e41c007 (patch) | |
tree | ae07c0784e322a4900199e6cbf277d0cdba8d316 /include/clang | |
parent | 2a35be803c405221f5f23c7bdedb91f09efdd3ac (diff) |
Make late-parsed attributes follow the conventions of ordinary
GNU attributes to a better extent, by allowing them in more
places on a declator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151945 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Parse/Parser.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index 89d1bb80da..3fc1fd9fb2 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -796,15 +796,15 @@ private: CachedTokens Toks; IdentifierInfo &AttrName; SourceLocation AttrNameLoc; - Decl *D; + SmallVector<Decl*, 2> Decls; explicit LateParsedAttribute(Parser *P, IdentifierInfo &Name, SourceLocation Loc) - : Self(P), AttrName(Name), AttrNameLoc(Loc), D(0) {} + : Self(P), AttrName(Name), AttrNameLoc(Loc) {} virtual void ParseLexedAttributes(); - void setDecl(Decl *Dec) { D = Dec; } + void addDecl(Decl *D) { Decls.push_back(D); } }; /// A list of late parsed attributes. Used by ParseGNUAttributes. @@ -1670,7 +1670,8 @@ private: void ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo = ParsedTemplateInfo(), AccessSpecifier AS = AS_none, - DeclSpecContext DSC = DSC_normal); + DeclSpecContext DSC = DSC_normal, + LateParsedAttrList *LateAttrs = 0); bool ParseOptionalTypeSpecifier(DeclSpec &DS, bool &isInvalid, const char *&PrevSpec, unsigned &DiagID, |