Skip to content

Commit d31ddad

Browse files
committed
C++: Small refactoring.
1 parent e75dcd2 commit d31ddad

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,10 @@ private newtype TDataFlowCall =
11431143
FlowSummaryImpl::Private::summaryCallbackRange(c, receiver)
11441144
}
11451145

1146+
private predicate summarizedCallableIsManual(SummarizedCallable sc) {
1147+
sc.asSummarizedCallable().applyManualModel()
1148+
}
1149+
11461150
/**
11471151
* A function call relevant for data flow. This includes calls from source
11481152
* code and calls inside library callables with a flow summary.
@@ -1178,13 +1182,13 @@ class DataFlowCall extends TDataFlowCall {
11781182
// target
11791183
not exists(SummarizedCallable sc |
11801184
sc.asSummarizedCallable() = target and
1181-
sc.asSummarizedCallable().applyManualModel()
1185+
summarizedCallableIsManual(sc)
11821186
) and
11831187
result.asSourceCallable() = target
11841188
or
11851189
// When there is no function body, or when we have a manual model then
11861190
// we dispatch to the summary.
1187-
(not target.hasDefinition() or result.asSummarizedCallable().applyManualModel()) and
1191+
(not target.hasDefinition() or summarizedCallableIsManual(result)) and
11881192
result.asSummarizedCallable() = target
11891193
)
11901194
}

0 commit comments

Comments
 (0)