diff options
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/BugReporter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index b82d12310e..31786dd002 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -438,10 +438,11 @@ public: FullSourceLoc L(S->getLocStart(), BR.getSourceManager()); if (Loc::isLocType(VD->getType())) { - std::string msg = "'" + std::string(VD->getNameAsString()) + - "' now aliases '" + MostRecent->getNameAsString() + "'"; + llvm::SmallString<64> buf; + llvm::raw_svector_ostream os(buf); + os << '\'' << VD << "' now aliases '" << MostRecent << '\''; - PD.push_front(new PathDiagnosticEventPiece(L, msg)); + PD.push_front(new PathDiagnosticEventPiece(L, os.str())); } return true; |