[cfe-commits] r152982 - in /cfe/trunk: include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h lib/StaticAnalyzer/Core/BugReporter.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Sat Mar 17 06:06:05 PDT 2012
Author: chapuni
Date: Sat Mar 17 08:06:05 2012
New Revision: 152982
URL: http://llvm.org/viewvc/llvm-project?rev=152982&view=rev
Log:
StaticAnalyzer: Fix abuse of StringRef in r152962.
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h?rev=152982&r1=152981&r2=152982&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h Sat Mar 17 08:06:05 2012
@@ -443,7 +443,7 @@
/// 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 "";
Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp?rev=152982&r1=152981&r2=152982&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Sat Mar 17 08:06:05 2012
@@ -395,7 +395,7 @@
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
More information about the cfe-commits
mailing list