File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
cpp/ql/src/semmle/code/cpp/ir/dataflow/internal Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,7 @@ private module VirtualDispatch {
70
70
// Call return
71
71
exists ( DataFlowCall call , ReturnKind returnKind |
72
72
other = getAnOutNode ( call , returnKind ) and
73
- src .( ReturnNode ) .getKind ( ) = returnKind and
74
- call .getStaticCallTarget ( ) = src .getEnclosingCallable ( )
73
+ returnNodeWithKindAndEnclosingCallable ( src , returnKind , call .getStaticCallTarget ( ) )
75
74
) and
76
75
allowFromArg = false
77
76
or
@@ -125,6 +124,16 @@ private module VirtualDispatch {
125
124
}
126
125
}
127
126
127
+ /**
128
+ * A ReturnNode with its ReturnKind and its enclosing callable.
129
+ *
130
+ * Used to fix a join ordering issue in flowsFrom.
131
+ */
132
+ private predicate returnNodeWithKindAndEnclosingCallable ( ReturnNode node , ReturnKind kind , DataFlowCallable callable ) {
133
+ node .getKind ( ) = kind and
134
+ node .getEnclosingCallable ( ) = callable
135
+ }
136
+
128
137
/** Call through a function pointer. */
129
138
private class DataSensitiveExprCall extends DataSensitiveCall {
130
139
DataSensitiveExprCall ( ) { not exists ( this .getStaticCallTarget ( ) ) }
You can’t perform that action at this time.
0 commit comments