[PATCH] D62611: [analyzer][Dominators] Add unittests
Kristóf Umann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 25 16:31:45 PDT 2019
Szelethus marked an inline comment as done.
Szelethus added inline comments.
================
Comment at: clang/unittests/Analysis/CFGDominatorTree.cpp:22-32
+template <class StmtType> struct FindStmt {
+ bool operator()(const CFGElement &E) {
+ if (auto S = E.getAs<CFGStmt>())
+ return isa<StmtType>(S->getStmt());
+ return false;
+ }
+};
----------------
NoQ wrote:
> Why isn't this a simple function template?
Hmmm, this entire thing is pointless, really. It is used as a sanity check of some sort, whether for example the 4th block really is what I believe it would be. But this is anything but a reliable way to test it.
I think this causes far more confusion than value, I'll just remove it, the actual tests are thorough enough enough to break if the CFG changes.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62611/new/
https://reviews.llvm.org/D62611
More information about the cfe-commits
mailing list