File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
cpp/ql/src/semmle/code/cpp/controlflow Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -42,3 +42,7 @@ The following changes in version 1.23 affect C/C++ analysis in all applications.
4242 clarity (e.g. ` isOutReturnPointer() ` to ` isReturnValueDeref() ` ). The existing member predicates
4343 have been deprecated, and will be removed in a future release. Code that uses the old member
4444 predicates should be updated to use the corresponding new member predicate.
45+ * The control-flow graph is now computed in QL, not in the extractor. This can
46+ lead to regressions (or improvements) in how queries are optimized because
47+ optimization in QL relies on static size estimates, and the control-flow edge
48+ relations will now have different size estimates than before.
Original file line number Diff line number Diff line change 11import cpp
22import BasicBlocks
33private import semmle.code.cpp.controlflow.internal.ConstantExprs
4+ private import semmle.code.cpp.controlflow.internal.CFG
45
56/**
67 * A control-flow node is either a statement or an expression; in addition,
@@ -86,11 +87,11 @@ import ControlFlowGraphPublic
8687class ControlFlowNodeBase extends ElementBase , @cfgnode { }
8788
8889predicate truecond_base ( ControlFlowNodeBase n1 , ControlFlowNodeBase n2 ) {
89- truecond ( unresolveElement ( n1 ) , unresolveElement ( n2 ) )
90+ qlCFGTrueSuccessor ( n1 , n2 )
9091}
9192
9293predicate falsecond_base ( ControlFlowNodeBase n1 , ControlFlowNodeBase n2 ) {
93- falsecond ( unresolveElement ( n1 ) , unresolveElement ( n2 ) )
94+ qlCFGFalseSuccessor ( n1 , n2 )
9495}
9596
9697/**
@@ -120,7 +121,7 @@ abstract class AdditionalControlFlowEdge extends ControlFlowNodeBase {
120121 * `AdditionalControlFlowEdge`. Use this relation instead of `successors`.
121122 */
122123predicate successors_extended ( ControlFlowNodeBase source , ControlFlowNodeBase target ) {
123- successors ( unresolveElement ( source ) , unresolveElement ( target ) )
124+ qlCFGSuccessor ( source , target )
124125 or
125126 source .( AdditionalControlFlowEdge ) .getAnEdgeTarget ( ) = target
126127}
You can’t perform that action at this time.
0 commit comments