@@ -391,14 +391,19 @@ class Function extends Declaration, ControlFlowNode, AccessHolder, @function {
391391 /** Holds if this function has a `noexcept` exception specification. */
392392 predicate isNoExcept ( ) { getADeclarationEntry ( ) .isNoExcept ( ) }
393393
394- /** Gets a function that overloads this one. */
394+ /**
395+ * Gets a function that overloads this one.
396+ *
397+ * Note: if _overrides_ are wanted rather than _overloads_ then
398+ * `MemberFunction::getAnOverridingFunction` should be used instead.
399+ */
395400 Function getAnOverload ( ) {
396401 (
397402 // If this function is declared in a class, only consider other
398403 // functions from the same class.
399- exists ( string name , Namespace namespace , Class declaringType |
400- candGetAnOverloadMember ( name , namespace , declaringType , this ) and
401- candGetAnOverloadMember ( name , namespace , declaringType , result )
404+ exists ( string name , Class declaringType |
405+ candGetAnOverloadMember ( name , declaringType , this ) and
406+ candGetAnOverloadMember ( name , declaringType , result )
402407 )
403408 or
404409 // Conversely, if this function is not
@@ -468,11 +473,8 @@ class Function extends Declaration, ControlFlowNode, AccessHolder, @function {
468473}
469474
470475pragma [ noinline]
471- private predicate candGetAnOverloadMember (
472- string name , Namespace namespace , Class declaringType , Function f
473- ) {
476+ private predicate candGetAnOverloadMember ( string name , Class declaringType , Function f ) {
474477 f .getName ( ) = name and
475- f .getNamespace ( ) = namespace and
476478 f .getDeclaringType ( ) = declaringType
477479}
478480
0 commit comments