summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-12 22:29:43 +0000
committerChris Lattner <sabre@nondot.org>2009-04-12 22:29:43 +0000
commit2b988c12fb1b4c8893aeb9fa9d460c0e8f0f35cd (patch)
treef718e93a01c5a3fb58ed503dc4813182b58ccc4c
parent869c6610c78c2af8ac407a2eed037f68c990be70 (diff)
downloadbcm5719-llvm-2b988c12fb1b4c8893aeb9fa9d460c0e8f0f35cd.tar.gz
bcm5719-llvm-2b988c12fb1b4c8893aeb9fa9d460c0e8f0f35cd.zip
add support for handling C++'0x unified initializer syntax
to isValidAfterIdentifierInDeclarator, as suggested by Sebastian. llvm-svn: 68920
-rw-r--r--clang/lib/Parse/ParseDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index da3ee1df7c5..a488815e9f4 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud