[cfe-commits] r170777 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaObjC/arc.m

Ted Kremenek kremenek at apple.com
Thu Dec 20 14:51:36 PST 2012


On Dec 20, 2012, at 2:48 PM, John McCall <rjmccall at apple.com> wrote:

> On Dec 20, 2012, at 2:31 PM, Ted Kremenek <kremenek at apple.com> wrote:
>> Author: kremenek
>> Date: Thu Dec 20 16:31:27 2012
>> New Revision: 170777
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=170777&view=rev
>> Log:
>> Revert "Warn if a __weak variable is initialized with an Objective-C object literal."
>> 
>> Per code feedback, I want to see if there is a more general way to do this.
> 
> When you add it back, please add the code to Sema::checkUnsafeAssigns,
> which is where the existing warning about code like this is implemented:
>  __weak id x = [NSString new];
> 
> John.

Right.  Both you and Jordan pointed this out.  Seems like the logical place to put it.



More information about the cfe-commits mailing list