aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BugReporter.cpp
diff options
context:
space:
mode:
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);
}