[cfe-commits] r150325 - in /cfe/trunk: lib/Rewrite/RewriteModernObjC.cpp lib/Rewrite/RewriteObjC.cpp test/Rewriter/func-in-impl.m

Fariborz Jahanian fjahanian at apple.com
Sun Feb 12 12:28:23 PST 2012


On Feb 11, 2012, at 8:48 PM, Argyrios Kyrtzidis wrote:

> Author: akirtzidis
> Date: Sat Feb 11 22:48:45 2012
> New Revision: 150325
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=150325&view=rev
> Log:
> Fix the rewriter that broke with r149987.
> 
> r149987 changed the way parsing happens inside an @implementation;
> it aggregates the declarations inside and reports them together as a DeclGroup.
> This had the side effect that function declarations were reported together with
> their definition, while the rewriter expected for function declarations to be
> reported immediately to the consumer and thus not have a body.
> 
> Fix this by having the rewriter actually check with isThisDeclarationADefinition()
> to make sure the body comes from the current decl before rewriting it.
> 

Thanks,

- Fariborz





More information about the cfe-commits mailing list