<div dir="ltr">Hi All,<div><br></div><div>I am working with some code that needs a finer granularity</div><div>of control when deciding how the CFGBuilder breaks up</div><div>statements in the CFG block. Since the current implementation</div><div>is limited to 'StmtClass's it is impossible to control individual</div><div>operations within a 'StmtClass'.</div><div><br></div><div>I was thinking about modifying CFG::BuildOptions to be accept</div><div>predicates. Something like the attached. Then one could write</div><div>code like:</div><div><br></div><div><div> setAddPredicate(Stmt::UnaryOperatorClass,</div><div> [=](const Stmt *stmt) -> bool {</div><div> const UnaryOperator *UO = cast<UnaryOperator>(stmt);</div><div> return UO->getOpcode() == UO_PreInc;</div><div> });</div><div><br></div><div><br></div><div>I wanted to float the idea first before submitting a patch.</div><div><br></div><div>Any comments on this approach? Is this something others find useful?</div><div><br></div><div>Cheers,</div><div><br></div><div>Meador</div>
</div></div>