Fix Parser::ParseDeclaratorInternal(): add langopts test when recognizing blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55468 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 76fca9e..cd2dda2 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1116,10 +1116,10 @@
       (Kind != tok::caret || !getLang().Blocks))
     return ParseDirectDeclarator(D);
   
-  // Otherwise, '*' -> pointer or '&' -> reference.
+  // Otherwise, '*' -> pointer, '^' -> block, '&' -> reference.
   SourceLocation Loc = ConsumeToken();  // Eat the * or &.
 
-  if (Kind == tok::star || Kind == tok::caret) {
+  if (Kind == tok::star || (Kind == tok::caret && getLang().Blocks)) {
     // Is a pointer.
     DeclSpec DS;