diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-12 22:29:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-12 22:29:43 +0000 |
commit | c83c27af6820585f4b6964f1e1f13f237a0d14fc (patch) | |
tree | 8c039faa81702ad17f1240b7d9b1f8f1cfdcf859 /lib/Parse/ParseDecl.cpp | |
parent | 8129edbb576c297df8631c3db4ac1339f4a9e8ad (diff) |
add support for handling C++'0x unified initializer syntax
to isValidAfterIdentifierInDeclarator, as suggested by Sebastian.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index da3ee1df7c..a488815e9f 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -475,6 +475,7 @@ void Parser::ParseSpecifierQualifierList(DeclSpec &DS) { /// int x = 17; // init-declarator-list /// int x , y; // init-declarator-list /// int x __asm__ ("foo"); // init-declarator-list +/// int x { 5}; // C++'0x unified initializers /// /// This is not, because 'x' does not immediately follow the declspec (though /// ')' happens to be valid anyway). @@ -483,8 +484,7 @@ void Parser::ParseSpecifierQualifierList(DeclSpec &DS) { static bool isValidAfterIdentifierInDeclarator(const Token &T) { return T.is(tok::l_square) || T.is(tok::l_paren) || T.is(tok::r_paren) || T.is(tok::semi) || T.is(tok::comma) || T.is(tok::equal) || - T.is(tok::kw_asm); - + T.is(tok::kw_asm) || T.is(tok::l_brace); } /// ParseDeclarationSpecifiers |