summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Analysis/BugReporter.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp
index e69c5a6d3ff..b736282aea5 100644
--- a/clang/lib/Analysis/BugReporter.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud