[PATCH] D62507: [Dominators] PR42041: Skip nullpointer successors

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 08:32:57 PDT 2019


Szelethus updated this revision to Diff 201679.
Szelethus added a comment.

Correctly use `reverse(children<NodePtr>(N))` and `inverse_children<NodePtr>(N)`, based on the original code:

  template <bool Inverse>
  struct ChildrenGetter {
    using ResultTy = SmallVector<NodePtr, 8>;
  
    static ResultTy Get(NodePtr N, std::integral_constant<bool, false>) {
      auto RChildren = reverse(children<NodePtr>(N));
      return ResultTy(RChildren.begin(), RChildren.end());
    }
  
    static ResultTy Get(NodePtr N, std::integral_constant<bool, true>) {
      auto IChildren = inverse_children<NodePtr>(N);
      return ResultTy(IChildren.begin(), IChildren.end());
    }
  
    using Tag = std::integral_constant<bool, Inverse>;
  
    // etc etc...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62507/new/

https://reviews.llvm.org/D62507

Files:
  clang/include/clang/Analysis/Analyses/Dominators.h
  clang/test/Analysis/domtest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62507.201679.patch
Type: text/x-patch
Size: 3606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190528/c5af7c6e/attachment.bin>


More information about the cfe-commits mailing list