[PATCH] D62551: [analyzer][Dominator] Add post dominator tree builder for the CFG + a debug checker
Kristóf Umann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 28 14:56:21 PDT 2019
Szelethus marked 5 inline comments as done.
Szelethus added inline comments.
================
Comment at: clang/include/clang/Analysis/Analyses/Dominators.h:111
+ assert(
+ (IDom && !IDom->getBlock() && *I == &(*I)->getParent()->getExit() &&
+ IsPostDom) ||
----------------
kuhar wrote:
> Assertions with multiple conditions conjoined are difficult to debug -- perhaps it'd be better to split them and assign to separate booleans for each condition, with descriptive names? This code can be hidden behind an ifdef for debug.
Do you like this better? I prefer running static analysis on large codebases with a Release+Asserts build, and I fear that this check will be lost if I use `#ifdef DEBUG`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62551/new/
https://reviews.llvm.org/D62551
More information about the cfe-commits
mailing list