[cfe-commits] r64973 - /cfe/trunk/lib/Analysis/CFRefCount.cpp

Ted Kremenek kremenek at apple.com
Wed Feb 18 14:59:04 PST 2009


Author: kremenek
Date: Wed Feb 18 16:59:04 2009
New Revision: 64973

URL: http://llvm.org/viewvc/llvm-project?rev=64973&view=rev
Log:
Remove logic for computing 'display hint'.

Modified:
    cfe/trunk/lib/Analysis/CFRefCount.cpp

Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=64973&r1=64972&r2=64973&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Wed Feb 18 16:59:04 2009
@@ -2597,27 +2597,8 @@
   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 @@
           " +"
        << RV->getCount() << " (object leaked).";
   
-  return new PathDiagnosticPiece(L, os.str(), Hint);
+  return new PathDiagnosticPiece(L, os.str());
 }
 
 





More information about the cfe-commits mailing list