aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-02-07 11:57:57 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-02-07 11:57:57 +0000
commita59d20b135bfde058a5a69045bab5ec4e2553f74 (patch)
tree315b8539cc8af111d5cfc6d843ca040f974cc0f3 /lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
parentf978059b82db8c0d849c5f992036210b5ca53200 (diff)
Print NamedDecls directly to a raw_ostream where possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporterVisitors.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/BugReporterVisitors.cpp4
1 files changed, 2 insertions, 2 deletions
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());