]> granicus.if.org Git - clang/commitdiff
Fix a parser bug that prevented it from correctly parsing explicit construct expresso...
authorSebastian Redl <sebastian.redl@getdesigned.at>
Thu, 22 Dec 2011 18:58:29 +0000 (18:58 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Thu, 22 Dec 2011 18:58:29 +0000 (18:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147155 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseExpr.cpp
test/SemaCXX/cxx0x-initializer-constructor.cpp

index 3619017a8087e302e20c7fc0131b83f0c034724b..8af7204cd138cca407f07c76caba7290283c7f17 100644 (file)
@@ -678,7 +678,8 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
       if (Next.is(tok::coloncolon) ||
           (!ColonIsSacred && Next.is(tok::colon)) ||
           Next.is(tok::less) ||
-          Next.is(tok::l_paren)) {
+          Next.is(tok::l_paren) ||
+          Next.is(tok::l_brace)) {
         // If TryAnnotateTypeOrScopeToken annotates the token, tail recurse.
         if (TryAnnotateTypeOrScopeToken())
           return ExprError();
index 7eff4c41aa9715dfe0fc825bd32120c11d8bf54c..c0e50100518fecaa3de4d3cbcdacd4ac1af6bded 100644 (file)
@@ -52,7 +52,7 @@ namespace objects {
   }
 
   void inline_init() {
-    //(void) C{1, 1.0}; FIXME: inline initialization
+    (void) C{1, 1.0};
     (void) new C{1, 1.0};
   }