[cfe-commits] r159690 - in /cfe/trunk/lib/Parse: ParseDecl.cpp Parser.cpp
Douglas Gregor
dgregor at apple.com
Tue Jul 3 15:56:24 PDT 2012
On Jul 3, 2012, at 3:29 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
> Author: fjahanian
> Date: Tue Jul 3 17:29:23 2012
> New Revision: 159690
>
> URL: http://llvm.org/viewvc/llvm-project?rev=159690&view=rev
> Log:
> Obj-C++11 parser: turn off buffering of
> c-function defined in objc class
> implementation for now.
Why?
- Doug
> Modified:
> cfe/trunk/lib/Parse/ParseDecl.cpp
> cfe/trunk/lib/Parse/Parser.cpp
>
> Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=159690&r1=159689&r2=159690&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
> +++ cfe/trunk/lib/Parse/ParseDecl.cpp Tue Jul 3 17:29:23 2012
> @@ -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;
>
> Modified: cfe/trunk/lib/Parse/Parser.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=159690&r1=159689&r2=159690&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Parse/Parser.cpp (original)
> +++ cfe/trunk/lib/Parse/Parser.cpp Tue Jul 3 17:29:23 2012
> @@ -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
> }
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list