From 493444fc19af23c46d14e30a66af6d681bf35dd7 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 16 Jan 2008 22:20:36 +0000 Subject: [PATCH] Fixed bug where we performed addition instead of subtraction during constant propagation. llvm-svn: 46095 --- clang/Analysis/GRConstants.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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