aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer')
-rw-r--r--lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp6
-rw-r--r--lib/StaticAnalyzer/Core/BugReporterVisitors.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
index 0bc1532659..6678a0b5eb 100644
--- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -2205,7 +2205,7 @@ CFRefLeakReportVisitor::getEndPath(BugReporterContext &BRC,
else {
const FunctionDecl *FD = cast<FunctionDecl>(D);
os << " is returned from a function whose name ('"
- << FD->getNameAsString()
+ << *FD
<< "') does not contain 'Copy' or 'Create'. This violates the naming"
" convention rules given in the Memory Management Guide for Core"
" Foundation";
diff --git a/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp b/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
index f769ea6ade..02ef6dc9cc 100644
--- a/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
@@ -165,18 +165,18 @@ void WalkAST::ReportVirtualCall(const CallExpr *CE, bool isPure) {
os << "Call Path : ";
// Name of current visiting CallExpr.
- os << CE->getDirectCallee()->getNameAsString();
+ os << *CE->getDirectCallee();
// Name of the CallExpr whose body is current walking.
if (visitingCallExpr)
- os << " <-- " << visitingCallExpr->getDirectCallee()->getNameAsString();
+ os << " <-- " << *visitingCallExpr->getDirectCallee();
// Names of FunctionDecls in worklist with state PostVisited.
for (SmallVectorImpl<const CallExpr *>::iterator I = WList.end(),
E = WList.begin(); I != E; --I) {
const FunctionDecl *FD = (*(I-1))->getDirectCallee();
assert(FD);
if (VisitedFunctions[FD] == PostVisited)
- os << " <-- " << FD->getNameAsString();
+ os << " <-- " << *FD;
}
PathDiagnosticLocation CELoc =
diff --git a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
index 3ea08cde00..ad3ac97a29 100644
--- a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
+++ b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
@@ -757,7 +757,7 @@ CallEnterExitBRVisitor::VisitNode(const ExplodedNode *N,
if (isa<BlockDecl>(callee))
Out << "Entering call to block";
else if (const NamedDecl *ND = dyn_cast<NamedDecl>(callee))
- Out << "Entering call to '" << ND->getNameAsString() << "'";
+ Out << "Entering call to '" << *ND << "'";
StringRef msg = Out.str();
if (msg.empty())
return 0;
@@ -767,7 +767,7 @@ CallEnterExitBRVisitor::VisitNode(const ExplodedNode *N,
const Decl *caller = CExit->getLocationContext()->getParent()->getDecl();
pos = getLastStmtLoc(PrevN, BRC.getSourceManager());
if (const NamedDecl *ND = dyn_cast<NamedDecl>(caller))
- Out << "Returning to '" << ND->getNameAsString() << "'";
+ Out << "Returning to '" << *ND << "'";
else
Out << "Returning to caller";
return new PathDiagnosticCallExitPiece(pos, Out.str());