aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/GRSimpleVals.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Analysis/GRSimpleVals.cpp b/lib/Analysis/GRSimpleVals.cpp
index fdb3ecdf73..a99cf31215 100644
--- a/lib/Analysis/GRSimpleVals.cpp
+++ b/lib/Analysis/GRSimpleVals.cpp
@@ -76,8 +76,11 @@ void EmitWarning(Diagnostic& Diag, PathDiagnosticClient* PD,
ITERATOR I, ITERATOR E, const char* msg) {
std::ostringstream Out;
- Out << "[CHECKER] " << msg;
- msg = Out.str().c_str();
+
+ if (!PD) {
+ Out << "[CHECKER] " << msg;
+ msg = Out.str().c_str();
+ }
bool isFirst = true;
unsigned ErrorDiag = 0;