diff options
author | Jordy Rose <jediknil@belkadan.com> | 2011-08-21 05:25:15 +0000 |
---|---|---|
committer | Jordy Rose <jediknil@belkadan.com> | 2011-08-21 05:25:15 +0000 |
commit | 7df1234c2e62b2a23dc4417e527f941c20ebe858 (patch) | |
tree | 2ffee97d95dc60b592e0a6a47ab29330a956f8d1 /lib/StaticAnalyzer/Core/CFRefCount.cpp | |
parent | d9f5a709ddbffe35dcc419c9c3fa6a852e833f7a (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/CFRefCount.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/CFRefCount.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/CFRefCount.cpp b/lib/StaticAnalyzer/Core/CFRefCount.cpp index 1b4e4a8673..7cffdb2388 100644 --- a/lib/StaticAnalyzer/Core/CFRefCount.cpp +++ b/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. |