From: Ted Kremenek Date: Sat, 7 Feb 2009 22:36:41 +0000 (+0000) Subject: Use BugReport::getDescription() for the compiler warning text. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d90e70819543a7a3aa099bb6cf1703551edfe306;p=clang 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 c42218e506..7a49112183 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -813,8 +813,8 @@ void BugReporter::FlushReport(BugReportEquivClass& EQ) { 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!");