[PATCH] D12901: [Static Analyzer] Assertion "System is over constrained" after truncating 64 bits integers to 32 bits. (PR25078)

Anna Zaks via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 6 11:33:52 PST 2016


zaks.anna added a comment.

> This patch also fixes a bug in 'RangeSet::pin' causing single value ranges to not be considered conventionally ordered.


Can that fix be submitted as a separate patch? Is there a test for it?


================
Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:351
@@ -351,1 +350,3 @@
       }
+      case CK_IntegralCast: {
+        // Delegate to SValBuilder to process.
----------------
SValBuilder::evalCast and SimpleSValBuilder::evalCastFromNonLoc perform a lot of special casing. I am not sure we are not loosing anything if we bypass them. For example, there is special handling of Booleans. We might want to add this smarter handling of the integral conversions inside SimpleSValBuilder::evalCastFromNonLoc, where you see the comment starting with "If the types are the same or both are integers, ignore the cast."


http://reviews.llvm.org/D12901





More information about the cfe-commits mailing list