[PATCH] D25731: [analyzer] NumberObjectConversion: Support OSNumber and CFNumberRef.

Anna Zaks via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 24 17:21:03 PDT 2016


zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.

Minor nit below.

Thanks for iterating so much on this!
Anna.



================
Comment at: test/Analysis/number-object-conversion.cpp:46
+#ifdef PEDANTIC
+  if (p) {} // expected-warning{{Converting a pointer value of type 'class OSNumber *' to a primitive boolean value; instead, either compare the pointer to nullptr or call a method on 'class OSNumber *' to get the scalar value}}
+  if (!p) {} // expected-warning{{Converting a pointer value of type 'class OSNumber *' to a primitive boolean value; instead, either compare the pointer to nullptr or call a method on 'class OSNumber *' to get the scalar value}}
----------------
Minor nit: Here, we want to use scalar instead of primitive so that both parts of the sentence are consistent. Devin did not like "scalar", but  that's what it is called in the API docs, so I think should use that word in this specific case. (We can keep 'primitive' for the error messages that do not have "to get the ... value")

Sorry, this is a bit confusing.



https://reviews.llvm.org/D25731





More information about the cfe-commits mailing list