diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-07 11:57:57 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-07 11:57:57 +0000 |
commit | db0fc5131ddd2be57c4a94e4cc5a31d855bf8e25 (patch) | |
tree | 6c1072cda1c7c552e14f88da5687372392cc4ca7 /clang/lib/StaticAnalyzer/Checkers | |
parent | 2f56992964a308e85ea5b39e836d04d498ea521d (diff) | |
download | bcm5719-llvm-db0fc5131ddd2be57c4a94e4cc5a31d855bf8e25.tar.gz bcm5719-llvm-db0fc5131ddd2be57c4a94e4cc5a31d855bf8e25.zip |
Print NamedDecls directly to a raw_ostream where possible.
llvm-svn: 149982
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 2 | ||||
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index 0bc1532659a..6678a0b5eb5 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/clang/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/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp index f769ea6ade8..02ef6dc9cc1 100644 --- a/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp +++ b/clang/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 = |