[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 29 11:20:30 PDT 2018


NoQ added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:192
+    if (from.isMinSignedValue()) {
+      F.add(newRanges, Range(BV.getMinValue(from), BV.getMinValue(from)));
+    }
----------------
NoQ wrote:
> Return value of `add` seems to be accidentally discarded here.
> 
> I guess i'll look into adding an `__attribute__((warn_unused_result))` to these functions, because it's a super common bug.
Also tests would have saved us.


https://reviews.llvm.org/D35110





More information about the cfe-commits mailing list