summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/SimpleConstraintManager.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2010-12-07 08:25:34 +0000
committerJay Foad <jay.foad@gmail.com>2010-12-07 08:25:34 +0000
commit6d4db0c8850543661493af107a1d601d12a89509 (patch)
tree8d09f8cde8e18587dc50e42150992071c57f9e43 /clang/lib/Checker/SimpleConstraintManager.cpp
parent583abbc4df3d9b9e5a86a56ae581970b98dc5249 (diff)
downloadbcm5719-llvm-6d4db0c8850543661493af107a1d601d12a89509.tar.gz
bcm5719-llvm-6d4db0c8850543661493af107a1d601d12a89509.zip
PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121121
Diffstat (limited to 'clang/lib/Checker/SimpleConstraintManager.cpp')
-rw-r--r--clang/lib/Checker/SimpleConstraintManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Checker/SimpleConstraintManager.cpp b/clang/lib/Checker/SimpleConstraintManager.cpp
index c23c749aa3e..9799aa8f960 100644
--- a/clang/lib/Checker/SimpleConstraintManager.cpp
+++ b/clang/lib/Checker/SimpleConstraintManager.cpp
@@ -265,11 +265,11 @@ const GRState *SimpleConstraintManager::assumeSymRel(const GRState *state,
// Convert the adjustment.
Adjustment.setIsUnsigned(isSymUnsigned);
- Adjustment.extOrTrunc(bitwidth);
+ Adjustment = Adjustment.extOrTrunc(bitwidth);
// Convert the right-hand side integer.
llvm::APSInt ConvertedInt(Int, isSymUnsigned);
- ConvertedInt.extOrTrunc(bitwidth);
+ ConvertedInt = ConvertedInt.extOrTrunc(bitwidth);
switch (op) {
default:
OpenPOWER on IntegriCloud