From: Ted Kremenek Date: Fri, 18 Apr 2008 22:11:59 +0000 (+0000) Subject: Reenable using the PathDiagnosticClient for BugReports without paths. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27fd5863b95854ad5579fddd048053642175b3b9;p=clang Reenable using the PathDiagnosticClient for BugReports without paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49934 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index e69c5a6d3f..b736282aea 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -422,6 +422,9 @@ void BugReporter::EmitWarning(BugReport& R) { unsigned ErrorDiag = Diag.getCustomDiagID(Diagnostic::Warning, os.str().c_str()); - - Diag.Report(L, ErrorDiag, NULL, 0, Beg, End - Beg); + + if (PD) + Diag.Report(PD, L, ErrorDiag, NULL, 0, Beg, End - Beg); + else + Diag.Report(L, ErrorDiag, NULL, 0, Beg, End - Beg); }