summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/CFRefCount.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
commit82c673de33dc40f6cedf616c0cc02623798c6fd0 (patch)
tree37ead238e0653a8b5f165006eb73066196c2b3c8 /clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
parent3cca223a2af617d1db17f42bf9f536240017408f (diff)
downloadbcm5719-llvm-82c673de33dc40f6cedf616c0cc02623798c6fd0.tar.gz
bcm5719-llvm-82c673de33dc40f6cedf616c0cc02623798c6fd0.zip
[analyzer] Replace calls to getNameAsString() with StringRef equivalents.
llvm-svn: 138215
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/CFRefCount.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/CFRefCount.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp b/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
index 1b4e4a8673d..7cffdb23881 100644
--- a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
+++ b/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
@@ -2189,13 +2189,12 @@ PathDiagnosticPiece *CFRefReportVisitor::VisitNode(const ExplodedNode *N,
const Stmt *S = cast<PostStmt>(N->getLocation()).getStmt();
SVal X = CurrSt->getSValAsScalarOrLoc(cast<CallExpr>(S)->getCallee());
const FunctionDecl *FD = X.getAsFunctionDecl();
- const std::string& FName = FD->getNameAsString();
if (TF.isGCEnabled()) {
// Determine if the object's reference count was pushed to zero.
assert(!(PrevV == CurrV) && "The typestate *must* have changed.");
- os << "In GC mode a call to '" << FName
+ os << "In GC mode a call to '" << FD
<< "' decrements an object's retain count and registers the "
"object with the garbage collector. ";
@@ -2210,7 +2209,7 @@ PathDiagnosticPiece *CFRefReportVisitor::VisitNode(const ExplodedNode *N,
<< '.';
}
else
- os << "When GC is not enabled a call to '" << FName
+ os << "When GC is not enabled a call to '" << FD
<< "' has no effect on its argument.";
// Nothing more to say.
OpenPOWER on IntegriCloud