aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Analysis/GRSimpleVals.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Analysis/GRSimpleVals.cpp b/lib/Analysis/GRSimpleVals.cpp
index a99cf31215..5944c12e58 100644
--- a/lib/Analysis/GRSimpleVals.cpp
+++ b/lib/Analysis/GRSimpleVals.cpp
@@ -76,10 +76,12 @@ void EmitWarning(Diagnostic& Diag, PathDiagnosticClient* PD,
ITERATOR I, ITERATOR E, const char* msg) {
std::ostringstream Out;
+ std::string Str;
if (!PD) {
Out << "[CHECKER] " << msg;
- msg = Out.str().c_str();
+ Str = Out.str();
+ msg = Str.c_str();
}
bool isFirst = true;