summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-02-20 19:22:51 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-02-20 19:22:51 +0000
commit54ecd9863fac6ec2a66296756af78f29f12f1667 (patch)
treee23f26ef69a91c0b3414dc55a939256030e57283 /clang/lib/Parse/ParseDecl.cpp
parent5cdb345883e210d27fe3d8f7ed307d315e2bf80b (diff)
downloadbcm5719-llvm-54ecd9863fac6ec2a66296756af78f29f12f1667.tar.gz
bcm5719-llvm-54ecd9863fac6ec2a66296756af78f29f12f1667.zip
Process and handle attributes on conditions and for loop variables. Process and
diagnose attributes on alias declarations, using directives, and attribute declarations. llvm-svn: 175649
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index cb013e77f13..8bfdffc8650 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -38,13 +38,16 @@ using namespace clang;
TypeResult Parser::ParseTypeName(SourceRange *Range,
Declarator::TheContext Context,
AccessSpecifier AS,
- Decl **OwnedType) {
+ Decl **OwnedType,
+ ParsedAttributes *Attrs) {
DeclSpecContext DSC = getDeclSpecContextFromDeclaratorContext(Context);
if (DSC == DSC_normal)
DSC = DSC_type_specifier;
// Parse the common declaration-specifiers piece.
DeclSpec DS(AttrFactory);
+ if (Attrs)
+ DS.addAttributes(Attrs->getList());
ParseSpecifierQualifierList(DS, AS, DSC);
if (OwnedType)
*OwnedType = DS.isTypeSpecOwned() ? DS.getRepAsDecl() : 0;
OpenPOWER on IntegriCloud