summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-01-16 22:20:36 +0000
committerTed Kremenek <kremenek@apple.com>2008-01-16 22:20:36 +0000
commit493444fc19af23c46d14e30a66af6d681bf35dd7 (patch)
treec088637716eeccacc15b554c0a5c766dfcf40e01
parente914bb8183dbb6d7025bf3304382c852fd6e2aaf (diff)
downloadllvm-493444fc19af23c46d14e30a66af6d681bf35dd7.tar.gz
Fixed bug where we performed addition instead of subtraction during
constant propagation. llvm-svn: 46095
-rw-r--r--clang/Analysis/GRConstants.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/Analysis/GRConstants.cpp b/clang/Analysis/GRConstants.cpp
index 82402559f23b..2173f9b671b2 100644
--- a/clang/Analysis/GRConstants.cpp
+++ b/clang/Analysis/GRConstants.cpp
@@ -134,7 +134,7 @@ public:
ExprVariantTy operator-(const ExprVariantTy& X) const {
if (!isConstant || !X.isConstant) return ExprVariantTy();
- else return ExprVariantTy(val+X.val);
+ else return ExprVariantTy(val-X.val);
}
};
} // end anonymous namespace