From: Ted Kremenek Date: Mon, 31 Mar 2008 20:42:43 +0000 (+0000) Subject: Do not prepend the keyword "[CHECKER]" to checker messages when using X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bb205c469e0a6c73b7979fdbcbb2488b088a66e;p=clang Do not prepend the keyword "[CHECKER]" to checker messages when using a PathDiagnosticClient. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48996 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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;