aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-02-18 22:59:04 +0000
committerTed Kremenek <kremenek@apple.com>2009-02-18 22:59:04 +0000
commit572b2782cad28ae99c232fbb316f8ba074e28a2d (patch)
tree1f0e4e43a481ac757963851678d7d80573800b91 /lib/Analysis/CFRefCount.cpp
parent3b6b83b8311ecdfa43cbb37ccc38c107d3b8d88b (diff)
Remove logic for computing 'display hint'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 99a1d81ba5..d79186d8cc 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -2597,27 +2597,8 @@ CFRefLeakReport::getEndPath(BugReporter& br, const ExplodedNode<GRState>* EndN){
assert (S);
unsigned EndLine = SMgr.getInstantiationLineNumber(S->getLocStart());
- // Look in the *trimmed* graph at the immediate predecessor of EndN. Does
- // it occur on the same line?
- PathDiagnosticPiece::DisplayHint Hint = PathDiagnosticPiece::Above;
-
- assert (!EndN->pred_empty()); // Not possible to have 0 predecessors.
- const ExplodedNode<GRState> *Pred = *(EndN->pred_begin());
- ProgramPoint PredPos = Pred->getLocation();
-
- if (PostStmt* PredPS = dyn_cast<PostStmt>(&PredPos)) {
-
- Stmt* SPred = PredPS->getStmt();
-
- // Predecessor at same line?
- if (SMgr.getInstantiationLineNumber(SPred->getLocStart()) != EndLine) {
- Hint = PathDiagnosticPiece::Below;
- S = SPred;
- }
- }
-
// Generate the diagnostic.
- FullSourceLoc L( S->getLocStart(), SMgr);
+ FullSourceLoc L(S->getLocStart(), SMgr);
std::string sbuf;
llvm::raw_string_ostream os(sbuf);
@@ -2645,7 +2626,7 @@ CFRefLeakReport::getEndPath(BugReporter& br, const ExplodedNode<GRState>* EndN){
" +"
<< RV->getCount() << " (object leaked).";
- return new PathDiagnosticPiece(L, os.str(), Hint);
+ return new PathDiagnosticPiece(L, os.str());
}