aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/BugReporter.cpp
diff options
context:
space:
mode:
authorJordy Rose <jediknil@belkadan.com>2011-08-21 05:25:15 +0000
committerJordy Rose <jediknil@belkadan.com>2011-08-21 05:25:15 +0000
commit7df1234c2e62b2a23dc4417e527f941c20ebe858 (patch)
tree2ffee97d95dc60b592e0a6a47ab29330a956f8d1 /lib/StaticAnalyzer/Core/BugReporter.cpp
parentd9f5a709ddbffe35dcc419c9c3fa6a852e833f7a (diff)
[analyzer] Replace calls to getNameAsString() with StringRef equivalents.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138215 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/BugReporter.cpp7
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;