aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-03-17 13:06:05 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-03-17 13:06:05 +0000
commit8fe4525680ce72e90cee3e58b5654e3ae955447f (patch)
tree1294ff077b2cfe41bcec5d3e79b7b8b8f00b8e60
parent8e42f2782338666ec67eab2e709e18b92060eeba (diff)
StaticAnalyzer: Fix abuse of StringRef in r152962.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152982 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h2
-rw-r--r--lib/StaticAnalyzer/Core/BugReporter.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
index 6460124b76..521b8999c4 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
@@ -443,7 +443,7 @@ public:
/// Produce the hint for the given node. The node contains
/// information about the call for which the diagnostic can be generated.
- StringRef getCallStackMessage(const ExplodedNode *N) {
+ std::string getCallStackMessage(const ExplodedNode *N) {
if (CallStackHint)
return CallStackHint->getMessage(N);
return "";
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp
index 363a6dffee..67dfcf51d2 100644
--- a/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -395,7 +395,7 @@ static void updateStackPiecesWithMessage(PathDiagnosticPiece *P,
E = CallStack.end(); I != E; ++I) {
PathDiagnosticCallPiece *CP = I->first;
const ExplodedNode *N = I->second;
- StringRef stackMsg = ep->getCallStackMessage(N);
+ std::string stackMsg = ep->getCallStackMessage(N);
// The last message on the path to final bug is the most important
// one. Since we traverse the path backwards, do not add the message