]> granicus.if.org Git - clang/commitdiff
Teach tentative parsing to handle block pointers (rdar://6394309)
authorChris Lattner <sabre@nondot.org>
Sat, 22 Nov 2008 01:15:33 +0000 (01:15 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 22 Nov 2008 01:15:33 +0000 (01:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59853 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseTentative.cpp

index ccaae6d3b250271568ec86f8dbe6a9a47aa2e8be..3c50884c9ce4622ff7f6d5eaf35caca4c40ea552 100644 (file)
@@ -399,7 +399,8 @@ Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract,
   //   ptr-operator declarator
 
   while (1) {
-    if (Tok.is(tok::star) || Tok.is(tok::amp)) {
+    if (Tok.is(tok::star) || Tok.is(tok::amp) || 
+        (Tok.is(tok::caret) && getLang().Blocks)) {
       // ptr-operator
       ConsumeToken();
       while (Tok.is(tok::kw_const)    ||