On Oct 3, 2012, at 13:47 , Jordan Rose <[email protected]> wrote:
> > On Oct 3, 2012, at 10:55 , Fariborz Jahanian <[email protected]> wrote: > >> Author: fjahanian >> Date: Wed Oct 3 12:55:29 2012 >> New Revision: 165133 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=165133&view=rev >> Log: >> objective-C arc: Warn under arc about a use of an ivar inside a block >> that doesn't have a 'self' as this implicitly captures 'self' and could >> create retain cycles. Provide fixit. // rdar://11194874 >> >> Added: >> cfe/trunk/test/FixIt/fixit-missing-self-in-block.m >> cfe/trunk/test/SemaObjC/warn-implicit-self-in-block.m >> Modified: >> cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td >> cfe/trunk/lib/Sema/SemaExpr.cpp >> cfe/trunk/test/SemaObjC/warn-retain-cycle.m >> >> Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=165133&r1=165132&r2=165133&view=diff >> ============================================================================== >> --- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original) >> +++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Oct 3 12:55:29 >> 2012 >> @@ -717,6 +717,10 @@ >> "but may be unpredictably set to nil; assign to a strong variable to keep " >> "the object alive">, >> InGroup<ARCRepeatedUseOfWeak>, DefaultIgnore; >> +def warn_implicitly_retains_self : Warning < >> + "block implicitily retains 'self' - explicitly mention 'self' to indicate >> " >> + "this is intended behavior">, >> + InGroup<DiagGroup<"implicit-retain-self">>; > > Typo: "implicitily". Also, I think we usually use a semicolon for the > suggestion. (I can see why the fixit is on the warning in this case -- it > doesn't change the behavior.) Oops, this is what I get for sending e-mails without checking all new commits. Sorry about that. I think the semicolon is still better, though. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
