Obj-C++11 parser: turn off buffering of
c-function defined in objc class
implementation for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159690 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index ac22111..0a8ab1a 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1379,8 +1379,10 @@
 
   bool ExpectSemi = Context != Declarator::ForContext;
 
+  // FIXME. make this work for Obj-C++11 parser.
   if (CurParsedObjCImpl && D.isFunctionDeclarator() &&
-      Tok.is(tok::l_brace)) {
+      Tok.is(tok::l_brace) &&
+      !getLangOpts().CPlusPlus0x) {
     // Consume the tokens and store them for later parsing.
     StashAwayMethodOrFunctionBodyTokens(FirstDecl);
     CurParsedObjCImpl->HasCFunction = true;
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index c2c4c90..8ae0aa9 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -775,6 +775,7 @@
     (getLangOpts().CPlusPlus &&
      Tok.is(tok::l_paren)) ||       // int X(0) -> not a function def [C++]
     (CurParsedObjCImpl && 
+     !getLangOpts().CPlusPlus0x && // FIXME for Obj-C++11 parser.
      Tok.is(tok::l_brace));        // C-function  nested in an @implementation
 }