[PATCH] D23147: [ADT] Migrate DepthFirstIterator to use NodeRef

Tim Shen via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 3 17:59:52 PDT 2016


timshen created this revision.
timshen added reviewers: dblaikie, chandlerc.
timshen added a subscriber: cfe-commits.

The corresponding LLVM change is D23146.

https://reviews.llvm.org/D23147

Files:
  include/clang/AST/StmtGraphTraits.h
  include/clang/Analysis/Analyses/Dominators.h
  include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h

Index: include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
===================================================================
--- include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
+++ include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
@@ -451,6 +451,7 @@
 namespace llvm {
   template<> struct GraphTraits<clang::ento::ExplodedNode*> {
     typedef clang::ento::ExplodedNode NodeType;
+    typedef clang::ento::ExplodedNode *NodeRef;
     typedef NodeType::succ_iterator  ChildIteratorType;
     typedef llvm::df_iterator<NodeType*>      nodes_iterator;
 
@@ -477,6 +478,7 @@
 
   template<> struct GraphTraits<const clang::ento::ExplodedNode*> {
     typedef const clang::ento::ExplodedNode NodeType;
+    typedef const clang::ento::ExplodedNode *NodeRef;
     typedef NodeType::const_succ_iterator   ChildIteratorType;
     typedef llvm::df_iterator<NodeType*>       nodes_iterator;
 
Index: include/clang/Analysis/Analyses/Dominators.h
===================================================================
--- include/clang/Analysis/Analyses/Dominators.h
+++ include/clang/Analysis/Analyses/Dominators.h
@@ -168,6 +168,7 @@
 namespace llvm {
 template <> struct GraphTraits< ::clang::DomTreeNode* > {
   typedef ::clang::DomTreeNode NodeType;
+  typedef ::clang::DomTreeNode *NodeRef;
   typedef NodeType::iterator  ChildIteratorType;
 
   static NodeType *getEntryNode(NodeType *N) {
Index: include/clang/AST/StmtGraphTraits.h
===================================================================
--- include/clang/AST/StmtGraphTraits.h
+++ include/clang/AST/StmtGraphTraits.h
@@ -26,6 +26,7 @@
 
 template <> struct GraphTraits<clang::Stmt*> {
   typedef clang::Stmt                       NodeType;
+  typedef clang::Stmt *                     NodeRef;
   typedef clang::Stmt::child_iterator       ChildIteratorType;
   typedef llvm::df_iterator<clang::Stmt*>   nodes_iterator;
 
@@ -53,6 +54,7 @@
 
 template <> struct GraphTraits<const clang::Stmt*> {
   typedef const clang::Stmt                       NodeType;
+  typedef const clang::Stmt *                     NodeRef;
   typedef clang::Stmt::const_child_iterator       ChildIteratorType;
   typedef llvm::df_iterator<const clang::Stmt*>   nodes_iterator;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23147.66745.patch
Type: text/x-patch
Size: 2255 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160804/4da6ac48/attachment-0001.bin>


More information about the cfe-commits mailing list