[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 26 13:26:52 PST 2018


george.karpenkov requested changes to this revision.
george.karpenkov added inline comments.
This revision now requires changes to proceed.


================
Comment at: test/Analysis/uninit-vals.m:222
   testObj->origin = makeIntPoint(1, 2);
-  if (testObj->size > 0) { ; } // expected-note{{Taking false branch}}
+  if (testObj->size > 0) { ; } // expected-note{{Assuming 'testObj->size' is <= 0}}
                                // expected-note at -1{{Taking false branch}}
----------------
Same here: we should know that `testObj->size == 0`


================
Comment at: test/Analysis/uninit-vals.m:324
   testObj->origin = makeIntPoint2D(1, 2);
-  if (testObj->size > 0) { ; } // expected-note{{Taking false branch}}
+  if (testObj->size > 0) { ; } // expected-note{{Assuming 'testObj->size' is <= 0}}
                                // expected-note at -1{{Taking false branch}}
----------------
That does not seem right: from `calloc` the analyzer should know that the `testObj->size` is actually zero.


================
Comment at: test/Analysis/virtualcall.cpp:170
+	// expected-note-re at -4 {{{{^}}Assuming 'i' is <= 0}}
+	// expected-note-re at -5 {{{{^}}Taking false branch}}
 #endif
----------------
Could you describe what happens here?
Why the `assuming` notes weren't there before?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53076/new/

https://reviews.llvm.org/D53076





More information about the cfe-commits mailing list