aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BugReporter.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-18 22:11:59 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-18 22:11:59 +0000
commit27fd5863b95854ad5579fddd048053642175b3b9 (patch)
treedadc8800d3cb7495587cb53ba6f22afbebfc34aa /lib/Analysis/BugReporter.cpp
parentf22eacb11b50e647e7d08531ca5648d3c84c38c3 (diff)
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
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r--lib/Analysis/BugReporter.cpp7
1 files changed, 5 insertions, 2 deletions
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);
}