diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-07-15 12:37:19 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-07-22 16:43:51 +0200 |
commit | 45b1169d063321c72002dd732e920b87c219e0af (patch) | |
tree | a94302fdcc1554f63c346821a3bdb4bd57e603e2 /src/libs/3rdparty/cplusplus/Bind.cpp | |
parent | d2db54b451bda4553ec171eb5802131a3a694f59 (diff) |
C++: Support alignas in C++11 mode.
Change-Id: Ifa81a481bf92b5b71495a105ae292f3e9895f704
Task-number: QTCREATORBUG-9279
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Bind.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/Bind.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/libs/3rdparty/cplusplus/Bind.cpp b/src/libs/3rdparty/cplusplus/Bind.cpp index 4f7be860df..ed39f95c1c 100644 --- a/src/libs/3rdparty/cplusplus/Bind.cpp +++ b/src/libs/3rdparty/cplusplus/Bind.cpp @@ -303,14 +303,14 @@ const Name *Bind::objCSelectorArgument(ObjCSelectorArgumentAST *ast, bool *hasAr return identifier(ast->name_token); } -bool Bind::visit(AttributeAST *ast) +bool Bind::visit(GnuAttributeAST *ast) { (void) ast; CPP_CHECK(!"unreachable"); return false; } -void Bind::attribute(AttributeAST *ast) +void Bind::attribute(GnuAttributeAST *ast) { if (! ast) return; @@ -2902,12 +2902,20 @@ bool Bind::visit(SimpleSpecifierAST *ast) return false; } -bool Bind::visit(AttributeSpecifierAST *ast) +bool Bind::visit(AlignmentSpecifierAST *ast) +{ + // Prevent visiting the type-id or alignment expression from changing the currently + // calculated type: + expression(ast->typeIdExprOrAlignmentExpr); + return false; +} + +bool Bind::visit(GnuAttributeSpecifierAST *ast) { // unsigned attribute_token = ast->attribute_token; // unsigned first_lparen_token = ast->first_lparen_token; // unsigned second_lparen_token = ast->second_lparen_token; - for (AttributeListAST *it = ast->attribute_list; it; it = it->next) { + for (GnuAttributeListAST *it = ast->attribute_list; it; it = it->next) { this->attribute(it->value); } // unsigned first_rparen_token = ast->first_rparen_token; |