aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/UndefResultChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Checker/UndefResultChecker.cpp')
-rw-r--r--lib/Checker/UndefResultChecker.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Checker/UndefResultChecker.cpp b/lib/Checker/UndefResultChecker.cpp
index 98f513ef44..fb2283a620 100644
--- a/lib/Checker/UndefResultChecker.cpp
+++ b/lib/Checker/UndefResultChecker.cpp
@@ -39,7 +39,7 @@ void clang::RegisterUndefResultChecker(GRExprEngine &Eng) {
void UndefResultChecker::PostVisitBinaryOperator(CheckerContext &C,
const BinaryOperator *B) {
const GRState *state = C.getState();
- if (state->getExprVal(B).isUndef()) {
+ if (state->getSVal(B).isUndef()) {
// Generate an error node.
ExplodedNode *N = C.GenerateSink();
if (!N)
@@ -53,11 +53,11 @@ void UndefResultChecker::PostVisitBinaryOperator(CheckerContext &C,
const Expr *Ex = NULL;
bool isLeft = true;
- if (state->getExprVal(B->getLHS()).isUndef()) {
+ if (state->getSVal(B->getLHS()).isUndef()) {
Ex = B->getLHS()->IgnoreParenCasts();
isLeft = true;
}
- else if (state->getExprVal(B->getRHS()).isUndef()) {
+ else if (state->getSVal(B->getRHS()).isUndef()) {
Ex = B->getRHS()->IgnoreParenCasts();
isLeft = false;
}