[cfe-commits] r49132 - /cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h

Ted Kremenek kremenek at apple.com
Wed Apr 2 21:58:30 PDT 2008


Author: kremenek
Date: Wed Apr  2 23:58:29 2008
New Revision: 49132

URL: http://llvm.org/viewvc/llvm-project?rev=49132&view=rev
Log:
Added node_iterator to ExplodedGraph to allow iteration over all nodes in
the graph.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h?rev=49132&r1=49131&r2=49132&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h Wed Apr  2 23:58:29 2008
@@ -344,11 +344,28 @@
   }
   
   // Iterators.
-  typedef NodeTy**         roots_iterator;
-  typedef const NodeTy**   const_roots_iterator;
-  typedef NodeTy**         eop_iterator;
-  typedef const NodeTy**   const_eop_iterator;
+  typedef NodeTy**                            roots_iterator;
+  typedef const NodeTy**                      const_roots_iterator;
+  typedef NodeTy**                            eop_iterator;
+  typedef const NodeTy**                      const_eop_iterator;
+  typedef typename AllNodesTy::iterator       node_iterator;
+  typedef typename AllNodesTy::const_iterator const_node_iterator;
   
+  node_iterator nodes_begin() {
+    return Nodes.begin();
+  }
+
+  node_iterator nodes_end() {
+    return Nodes.end();
+  }
+  
+  const_node_iterator nodes_begin() const {
+    return Nodes.begin();
+  }
+  
+  const_node_iterator nodes_end() const {
+    return Nodes.end();
+  }
   
   roots_iterator roots_begin() {
     return reinterpret_cast<roots_iterator>(Roots.begin());





More information about the cfe-commits mailing list