[cfe-commits] r91989 - /cfe/trunk/lib/Analysis/GRCoreEngine.cpp

Zhongxing Xu xuzhongxing at gmail.com
Wed Dec 23 00:54:59 PST 2009


Author: zhongxingxu
Date: Wed Dec 23 02:54:57 2009
New Revision: 91989

URL: http://llvm.org/viewvc/llvm-project?rev=91989&view=rev
Log:
For inter-procedural analysis, predecessor node may be in another function.
So we should use the current program point.

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

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

==============================================================================
--- cfe/trunk/lib/Analysis/GRCoreEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRCoreEngine.cpp Wed Dec 23 02:54:57 2009
@@ -213,9 +213,9 @@
   CFGBlock* Blk = L.getDst();
 
   // Check if we are entering the EXIT block.
-  if (Blk == &(Pred->getLocationContext()->getCFG()->getExit())) {
+  if (Blk == &(L.getLocationContext()->getCFG()->getExit())) {
 
-    assert (Pred->getLocationContext()->getCFG()->getExit().size() == 0
+    assert (L.getLocationContext()->getCFG()->getExit().size() == 0
             && "EXIT block cannot contain Stmts.");
 
     // Process the final state transition.
@@ -447,7 +447,7 @@
                                         ProgramPoint::Kind K,
                                         const void *tag) {
   
-  const ProgramPoint &L = GetProgramPoint(S, K, Pred->getLocationContext(),tag);  
+  const ProgramPoint &L = GetProgramPoint(S, K, Pred->getLocationContext(),tag);
   return generateNodeInternal(L, state, Pred);
 }
 





More information about the cfe-commits mailing list