[PATCH] D53637: [analyzer] Fixed bitvector from model always being unsigned

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 25 10:31:22 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL345283: [analyzer] Fixed bitvector from model always being unsigned (authored by mramalho, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D53637?vs=170837&id=171137#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D53637

Files:
  cfe/trunk/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp


Index: cfe/trunk/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp
===================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp
+++ cfe/trunk/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp
@@ -733,9 +733,11 @@
 
   llvm::APSInt getBitvector(const SMTExprRef &Exp, unsigned BitWidth,
                             bool isUnsigned) override {
-    return llvm::APSInt(llvm::APInt(
-        BitWidth, Z3_get_numeral_string(Context.Context, toZ3Expr(*Exp).AST),
-        10));
+    return llvm::APSInt(
+        llvm::APInt(BitWidth,
+                    Z3_get_numeral_string(Context.Context, toZ3Expr(*Exp).AST),
+                    10),
+        isUnsigned);
   }
 
   bool getBoolean(const SMTExprRef &Exp) override {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53637.171137.patch
Type: text/x-patch
Size: 786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181025/93fd4081/attachment.bin>


More information about the llvm-commits mailing list