Skip to content

Commit 493444f

Browse files
committed
Fixed bug where we performed addition instead of subtraction during
constant propagation. llvm-svn: 46095
1 parent e914bb8 commit 493444f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/Analysis/GRConstants.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class VISIBILITY_HIDDEN ExprVariantTy {
134134

135135
ExprVariantTy operator-(const ExprVariantTy& X) const {
136136
if (!isConstant || !X.isConstant) return ExprVariantTy();
137-
else return ExprVariantTy(val+X.val);
137+
else return ExprVariantTy(val-X.val);
138138
}
139139
};
140140
} // end anonymous namespace

0 commit comments

Comments
 (0)