summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-06 23:58:11 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-06 23:58:11 +0000
commitb6b7ce4b50ecc2ae104f1bef95b18b575bc59226 (patch)
treec5a5d017e82d65d80b154f678789b1460e58f44e /clang/lib/Analysis/CFRefCount.cpp
parent65530cb62e46625af16ca7ef2d0dbfaba789b1dd (diff)
downloadbcm5719-llvm-b6b7ce4b50ecc2ae104f1bef95b18b575bc59226.tar.gz
bcm5719-llvm-b6b7ce4b50ecc2ae104f1bef95b18b575bc59226.zip
Create PathDiagnosticPiece subclasses PathDiagnosticEventPiece and
PathDiagnosticControlFlowPiece to distinguish (in the class hierarchy) between events and control-flow diagnostic pieces. Clients must now use these directly when constructing PathDiagnosticPieces. llvm-svn: 66310
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index 6caea59f3e4..b08bce1d58a 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/lib/Analysis/CFRefCount.cpp
@@ -2506,7 +2506,7 @@ PathDiagnosticPiece* CFRefReport::VisitNode(const ExplodedNode<GRState>* N,
}
FullSourceLoc Pos(S->getLocStart(), BR.getContext().getSourceManager());
- PathDiagnosticPiece* P = new PathDiagnosticPiece(Pos, os.str());
+ PathDiagnosticPiece* P = new PathDiagnosticEventPiece(Pos, os.str());
if (Expr* Exp = dyn_cast<Expr>(S))
P->addRange(Exp->getSourceRange());
@@ -2655,7 +2655,7 @@ PathDiagnosticPiece* CFRefReport::VisitNode(const ExplodedNode<GRState>* N,
Stmt* S = cast<PostStmt>(N->getLocation()).getStmt();
FullSourceLoc Pos(S->getLocStart(), BR.getContext().getSourceManager());
- PathDiagnosticPiece* P = new PathDiagnosticPiece(Pos, os.str());
+ PathDiagnosticPiece* P = new PathDiagnosticEventPiece(Pos, os.str());
// Add the range by scanning the children of the statement for any bindings
// to Sym.
@@ -2844,7 +2844,7 @@ CFRefLeakReport::getEndPath(BugReporter& br, const ExplodedNode<GRState>* EndN){
" +"
<< RV->getCount() << " (object leaked).";
- return new PathDiagnosticPiece(L, os.str());
+ return new PathDiagnosticEventPiece(L, os.str());
}
OpenPOWER on IntegriCloud