From 6bb205c469e0a6c73b7979fdbcbb2488b088a66e Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 31 Mar 2008 20:42:43 +0000 Subject: [PATCH] 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 --- lib/Analysis/GRSimpleVals.cpp | 7 +++++-- 1 file 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; -- 2.40.0