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.
42
42
clarity (e.g. ` isOutReturnPointer() ` to ` isReturnValueDeref() ` ). The existing member predicates
43
43
have been deprecated, and will be removed in a future release. Code that uses the old member
44
44
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 1
1
import cpp
2
2
import BasicBlocks
3
3
private import semmle.code.cpp.controlflow.internal.ConstantExprs
4
+ private import semmle.code.cpp.controlflow.internal.CFG
4
5
5
6
/**
6
7
* A control-flow node is either a statement or an expression; in addition,
@@ -86,11 +87,11 @@ import ControlFlowGraphPublic
86
87
class ControlFlowNodeBase extends ElementBase , @cfgnode { }
87
88
88
89
predicate truecond_base ( ControlFlowNodeBase n1 , ControlFlowNodeBase n2 ) {
89
- truecond ( unresolveElement ( n1 ) , unresolveElement ( n2 ) )
90
+ qlCFGTrueSuccessor ( n1 , n2 )
90
91
}
91
92
92
93
predicate falsecond_base ( ControlFlowNodeBase n1 , ControlFlowNodeBase n2 ) {
93
- falsecond ( unresolveElement ( n1 ) , unresolveElement ( n2 ) )
94
+ qlCFGFalseSuccessor ( n1 , n2 )
94
95
}
95
96
96
97
/**
@@ -120,7 +121,7 @@ abstract class AdditionalControlFlowEdge extends ControlFlowNodeBase {
120
121
* `AdditionalControlFlowEdge`. Use this relation instead of `successors`.
121
122
*/
122
123
predicate successors_extended ( ControlFlowNodeBase source , ControlFlowNodeBase target ) {
123
- successors ( unresolveElement ( source ) , unresolveElement ( target ) )
124
+ qlCFGSuccessor ( source , target )
124
125
or
125
126
source .( AdditionalControlFlowEdge ) .getAnEdgeTarget ( ) = target
126
127
}
You can’t perform that action at this time.
0 commit comments