[PATCH] D12251: Analyzer: Calculate field offset correctly
Ismail Pazarbasi via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 30 10:10:21 PDT 2015
ismailp marked 3 inline comments as done.
================
Comment at: test/Analysis/array-struct-region.cpp:128
@@ +127,3 @@
+#if __cplusplus
+ clang_analyzer_eval((void *)&PFONew->secondField != (void *)&PFONew); // expected-warning{{TRUE}}
+#endif
----------------
I might be missing something, and would be very happy if you could explain why it is necessary to add `PFOConstant`.
At line 122, for example, where `&FO` is always non-null. Likewise, I'd expect line 128 to be non-null, because `new` in this translation unit either throws -- in which case, we shouldn't be executing this line -- or succeeds -- in which case, `PFONew` is non-null.
http://reviews.llvm.org/D12251
More information about the cfe-commits
mailing list