File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ DataFlowCallable viableCallable(DataFlowCall call) {
2727 or
2828 // Virtual dispatch
2929 result = call .( VirtualDispatch:: DataSensitiveCall ) .resolve ( )
30+ or
31+ // Additional call targets
32+ result = any ( AdditionalCallTarget additional ) .viableTarget ( call .getUnconvertedResultExpression ( ) )
3033}
3134
3235/**
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ private import DataFlowPrivate
1414private import ModelUtil
1515private import SsaInternals as Ssa
1616private import DataFlowImplCommon as DataFlowImplCommon
17+ private import codeql.util.Unit
1718
1819/**
1920 * The IR dataflow graph consists of the following nodes:
@@ -2237,3 +2238,15 @@ module InstructionBarrierGuard<instructionGuardChecksSig/3 instructionGuardCheck
22372238 )
22382239 }
22392240}
2241+
2242+ /**
2243+ * A unit class for adding additional call steps.
2244+ *
2245+ * Extend this class to add additional call steps to the data flow graph.
2246+ */
2247+ class AdditionalCallTarget extends Unit {
2248+ /**
2249+ * Gets a viable target for `call`.
2250+ */
2251+ abstract DataFlowCallable viableTarget ( Call call ) ;
2252+ }
You can’t perform that action at this time.
0 commit comments