[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

Jakub Kuderski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 17 08:10:49 PDT 2019


kuhar added inline comments.


================
Comment at: clang/include/clang/Analysis/Analyses/Dominators.h:51
+  CFGDominatorTreeImpl(CFG *cfg) {
+    buildDominatorTree(cfg);
+  }
----------------
DomTree has a constructor that runs the builder -- why not use it directly?


================
Comment at: clang/include/clang/Analysis/Analyses/Dominators.h:160
   /// changes.
   void changeImmediateDominator(CFGBlock *N, CFGBlock *NewIDom) {
     DT.changeImmediateDominator(N, NewIDom);
----------------
Do you need it at all? I understand it's a wrapper around dominators, but this API is virtually impossible to use safely.


================
Comment at: clang/include/clang/Analysis/Analyses/Dominators.h:225
+
+  /// Whether \p A is control dependent of \p B.
+  bool isControlDependent(CFGBlock *A, CFGBlock *B) {
----------------
I thinks it should be `A is control dependent on B`


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

https://reviews.llvm.org/D62619





More information about the cfe-commits mailing list