]> granicus.if.org Git - clang/commitdiff
Do not prepend the keyword "[CHECKER]" to checker messages when using
authorTed Kremenek <kremenek@apple.com>
Mon, 31 Mar 2008 20:42:43 +0000 (20:42 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 31 Mar 2008 20:42:43 +0000 (20:42 +0000)
a PathDiagnosticClient.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48996 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GRSimpleVals.cpp

index fdb3ecdf73971649eee63ac18e0d4787257df264..a99cf312152f3248037f83248b48f0686352ec9f 100644 (file)
@@ -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;