Use BugReport::getDescription() for the compiler warning text.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64038 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index c42218e..7a49112 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -813,8 +813,8 @@
R.getRanges(*this, Beg, End);
Diagnostic& Diag = getDiagnostic();
FullSourceLoc L(R.getLocation(), getSourceManager());
- const std::string &msg = PD ? R.getBugType().getName() : R.getDescription();
- unsigned ErrorDiag = Diag.getCustomDiagID(Diagnostic::Warning, msg.c_str());
+ unsigned ErrorDiag = Diag.getCustomDiagID(Diagnostic::Warning,
+ R.getDescription().c_str());
switch (End-Beg) {
default: assert(0 && "Don't handle this many ranges yet!");