aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Analysis/UndefResultChecker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/UndefResultChecker.cpp b/lib/Analysis/UndefResultChecker.cpp
index da2439013c..ec12a988e5 100644
--- a/lib/Analysis/UndefResultChecker.cpp
+++ b/lib/Analysis/UndefResultChecker.cpp
@@ -76,9 +76,10 @@ void UndefResultChecker::PostVisitBinaryOperator(CheckerContext &C,
}
EnhancedBugReport *report = new EnhancedBugReport(*BT,
OS.str().str().c_str(), N);
- report->addRange(Ex->getSourceRange());
- if (Ex)
+ if (Ex) {
+ report->addRange(Ex->getSourceRange());
report->addVisitorCreator(bugreporter::registerTrackNullOrUndefValue, Ex);
+ }
else
report->addVisitorCreator(bugreporter::registerTrackNullOrUndefValue, B);
C.EmitReport(report);