NoQ edited subscribers, added: NoQ; removed: dergachev.a.
NoQ added inline comments.


================
Comment at: test/Analysis/nullability_nullonly.mm:103
 void testObjCARCExplicitZeroInitialization() {
-  TestObject * _Nonnull explicitlyZeroInitialized = nil; // expected-warning 
{{nil assigned to a pointer which is expected to have non-null value}}
+  TestObject * _Nonnull explicitlyZeroInitialized = nil; // expected-warning 
{{nil assigned to a pointer which is expected to have non-null value}} 
expected-warning{{implicitly casting a null constant to non-nullable pointer 
type 'TestObject * _Nonnull __strong'}}
 }
----------------
jordan_rose wrote:
> @dergachev.a, what do you think here? Is it okay that the analyzer diagnoses 
> this in addition to the new warning?
We're usually trying to avoid this when we notice it, but there are many cases 
where we didn't notice it because both warnings and the analyzer are becoming 
better independently. I guess you could just give us a heads up with a bug 
report if you don't want to bother with this.

In this case i think it should be easy to fix though, because the analyzer 
already has `static isARCNilInitializedLocal()` that suppresses implicit null 
initializers, we could teach it to suppress all null initializers instead.


Repository:
  rC Clang

https://reviews.llvm.org/D22391



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to