diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll index 9e60c02ef0d..670a9d65ad5 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll @@ -375,10 +375,12 @@ private string paramsStringPart(Function c, int i) { * Parameter types are represented by their type erasure. */ cached -string paramsString(Function c) { result = concat(int i | | paramsStringPart(c, i) order by i) } +private string paramsString(Function c) { + result = concat(int i | | paramsStringPart(c, i) order by i) +} bindingset[func] -predicate matchesSignature(Function func, string signature) { +private predicate matchesSignature(Function func, string signature) { signature = "" or paramsString(func) = signature } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll index 02864bad224..e46c3166b55 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll @@ -1046,6 +1046,10 @@ class DataFlowCallable extends TDataFlowCallable { this = TSummarizedCallable(result) } + /** + * Gets the underlying `Declaration` of this `DataFlowCallable`. This + * predicate returns a result for both source and summarized callables. + */ Cpp::Declaration getUnderlyingCallable() { result = this.asSummarizedCallable() or // SummarizedCallable = Function (in CPP) result = this.asSourceCallable() diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll index d6f6eaf5e76..551ef04b997 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll @@ -743,6 +743,10 @@ class InitialGlobalValue extends Node, TInitialGlobalValue { * of a models-as-data modeled function. */ class FlowSummaryNode extends Node, TFlowSummaryNode { + /** + * Gets the models-as-data `SummaryNode` associated with this dataflow + * `FlowSummaryNode`. + */ FlowSummaryImpl::Private::SummaryNode getSummaryNode() { this = TFlowSummaryNode(result) } /**