]> granicus.if.org Git - clang/commitdiff
Use BugReport::getDescription() for the compiler warning text.
authorTed Kremenek <kremenek@apple.com>
Sat, 7 Feb 2009 22:36:41 +0000 (22:36 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 7 Feb 2009 22:36:41 +0000 (22:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64038 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BugReporter.cpp

index c42218e506c9c6124b26235a6374c34738294007..7a491121836c8e65091e0e0f06cf35b3e5d34147 100644 (file)
@@ -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!");