NoQ added inline comments.

================
Comment at: test/Analysis/CFNumber.c:39
+  unsigned char scalar = 0;
+  CFNumberGetValue(x, kCFNumberSInt16Type, &scalar);  // expected-warning{{A 
CFNumber object that represents a 16-bit integer is used to initialize an 8-bit 
integer; 8 bits of the CFNumber value will overwrite adjacent storage}}
+  return scalar;
----------------
We're not sure from this code if the `CFNumber` object `x` actually represents 
a 16-bit integer, or somebody just misplaced the `kCFNumberSInt16Type` thing. I 
think the warning message could be made more precise in this sence, but i'm not 
good at coming up with warning messages.

Hmm, there could actually be a separate check for detecting inconsistent type 
specifiers used for accessing the same CFNumber object.


https://reviews.llvm.org/D25876



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

Reply via email to