8787 */
8888
8989import csharp
90- private import ExternalFlowExtensions as Extensions
91- private import internal. AccessPathSyntax
92- private import internal. DataFlowDispatch
93- private import internal. DataFlowPrivate
94- private import internal. DataFlowPublic
95- private import internal. FlowSummaryImpl:: Public
96- private import internal. FlowSummaryImpl:: Private:: External
97- private import internal. FlowSummaryImplSpecific
90+ import ExternalFlowExtensions
91+ private import AccessPathSyntax
92+ private import DataFlowDispatch
93+ private import DataFlowPrivate
94+ private import DataFlowPublic
95+ private import FlowSummaryImpl:: Public
96+ private import FlowSummaryImpl:: Private:: External
97+ private import FlowSummaryImplSpecific
9898private import codeql.mad.ModelValidation as SharedModelVal
9999
100- /** Holds if a source model exists for the given parameters. */
101- predicate sourceModel = Extensions:: sourceModel / 9 ;
102-
103- /** Holds if a sink model exists for the given parameters. */
104- predicate sinkModel = Extensions:: sinkModel / 9 ;
105-
106- /** Holds if a summary model exists for the given parameters. */
107- predicate summaryModel = Extensions:: summaryModel / 10 ;
108-
109- /** Holds if a neutral model exists for the given parameters. */
110- predicate neutralModel = Extensions:: neutralModel / 6 ;
111-
112100private predicate relevantNamespace ( string namespace ) {
113101 sourceModel ( namespace , _, _, _, _, _, _, _, _) or
114102 sinkModel ( namespace , _, _, _, _, _, _, _, _) or
@@ -310,10 +298,17 @@ class UnboundCallable extends Callable {
310298 }
311299}
312300
301+ private predicate hasName ( Declaration d , string name ) {
302+ d .( Operator ) .getFunctionName ( ) = name
303+ or
304+ not d instanceof Operator and
305+ d .hasName ( name )
306+ }
307+
313308pragma [ nomagic]
314309private predicate callableSpecInfo ( Callable c , string namespace , string type , string name ) {
315310 c .getDeclaringType ( ) .hasQualifiedName ( namespace , type ) and
316- c . getName ( ) = name
311+ hasName ( c , name )
317312}
318313
319314pragma [ nomagic]
@@ -326,7 +321,7 @@ private predicate subtypeSpecCandidate(string name, UnboundValueOrRefType t) {
326321
327322pragma [ nomagic]
328323private predicate callableInfo ( Callable c , string name , UnboundValueOrRefType decl ) {
329- name = c . getName ( ) and
324+ hasName ( c , name ) and
330325 decl = c .getDeclaringType ( )
331326}
332327
@@ -387,7 +382,7 @@ private Element interpretElement0(
387382 subtypes = true and result .( UnboundCallable ) .overridesOrImplementsUnbound ( m )
388383 ) and
389384 m .getDeclaringType ( ) = t and
390- m . hasName ( name )
385+ hasName ( m , name )
391386 |
392387 signature = ""
393388 or
0 commit comments