diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-09-29 18:04:28 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-09-29 18:04:28 +0000 |
commit | 82d0b0aab9088e977c2a44c4a5a90479c63149fe (patch) | |
tree | 39d62bb6b6814bd9a9daa959efa9121f78aadfab /lib/Parse/ParseTentative.cpp | |
parent | 35f37cd6637f5cb4dbf18a542b501fd40522ba7b (diff) |
Add support for alignment-specifiers in C1X and C++11, remove
support for the C++0x draft [[align]] attribute and add the C1X
standard header file stdalign.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140796 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTentative.cpp')
-rw-r--r-- | lib/Parse/ParseTentative.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp index 9b2ea90ba1..210d179db1 100644 --- a/lib/Parse/ParseTentative.cpp +++ b/lib/Parse/ParseTentative.cpp @@ -377,6 +377,7 @@ bool Parser::isCXXTypeId(TentativeCXXTypeIdContext Context, bool &isAmbiguous) { /// /// [C++0x] attribute-specifier: /// '[' '[' attribute-list ']' ']' +/// alignment-specifier /// /// [C++0x] attribute-list: /// attribute[opt] @@ -409,6 +410,9 @@ bool Parser::isCXXTypeId(TentativeCXXTypeIdContext Context, bool &isAmbiguous) { /// any token but '(', ')', '[', ']', '{', or '}' bool Parser::isCXX0XAttributeSpecifier (bool CheckClosing, tok::TokenKind *After) { + if (Tok.is(tok::kw_alignas)) + return true; + if (Tok.isNot(tok::l_square) || NextToken().isNot(tok::l_square)) return false; |