@@ -656,6 +656,7 @@ private string getTypeNameWithoutFunctionTemplates(Function f, int n, int remain
656656 * Normalize the `n`'th parameter of `f` by replacing template names
657657 * with `class:N` (where `N` is the index of the template).
658658 */
659+ pragma [ nomagic]
659660private string getTypeNameWithoutClassTemplates ( Function f , int n , int remaining ) {
660661 // If there is a declaring type then we start by expanding the function templates
661662 exists ( Class template |
@@ -727,6 +728,7 @@ private string getSignatureWithoutClassTemplateNames(
727728 * - The `remaining` number of template arguments in `partiallyNormalizedSignature`
728729 * with their index in `nameArgs`.
729730 */
731+ pragma [ nomagic]
730732private string getSignatureWithoutFunctionTemplateNames (
731733 string partiallyNormalizedSignature , string typeArgs , string nameArgs , int remaining
732734) {
@@ -770,6 +772,7 @@ private string getSignatureWithoutFunctionTemplateNames(
770772 * ```
771773 * In this case, `normalizedSignature` will be `"(const func:0 &,int,class:1,class:0 *)"`.
772774 */
775+ pragma [ nomagic]
773776private predicate elementSpecWithArguments (
774777 string signature , string type , string name , string normalizedSignature , string typeArgs ,
775778 string nameArgs
@@ -795,23 +798,26 @@ private string getSignatureParameterName(string signature, string type, string n
795798 * If `subtypes` is `true` then the result may be an override of the function
796799 * identified by the components.
797800 */
798- bindingset [ type , name ]
801+ pragma [ nomagic ]
799802private Function getFunction ( string namespace , string type , boolean subtypes , string name ) {
800- funcHasQualifiedName ( result , namespace , name ) and
801- subtypes = false and
802- type = ""
803- or
804- exists ( Class namedClass , Class classWithMethod |
805- hasClassAndName ( classWithMethod , result , name ) and
806- classHasQualifiedName ( namedClass , namespace , type )
807- |
808- // member declared in the named type or a subtype of it
809- subtypes = true and
810- classWithMethod = namedClass .getADerivedClass * ( )
811- or
812- // member declared directly in the named type
803+ elementSpec ( namespace , type , subtypes , name , _, _) and
804+ (
805+ funcHasQualifiedName ( result , namespace , name ) and
813806 subtypes = false and
814- classWithMethod = namedClass
807+ type = ""
808+ or
809+ exists ( Class namedClass , Class classWithMethod |
810+ hasClassAndName ( classWithMethod , result , name ) and
811+ classHasQualifiedName ( namedClass , namespace , type )
812+ |
813+ // member declared in the named type or a subtype of it
814+ subtypes = true and
815+ classWithMethod = namedClass .getADerivedClass * ( )
816+ or
817+ // member declared directly in the named type
818+ subtypes = false and
819+ classWithMethod = namedClass
820+ )
815821 )
816822}
817823
@@ -838,6 +844,7 @@ private Function getFunction(string namespace, string type, boolean subtypes, st
838844 * is `func:n` then the signature name is compared with the `n`'th name
839845 * in `name`.
840846 */
847+ pragma [ nomagic]
841848private predicate signatureMatches (
842849 Function func , string namespace , string signature , string type , string name , int i
843850) {
@@ -912,6 +919,7 @@ private predicate parseParens(string s, string betweenParens) { s = "(" + betwee
912919 * - `signatureWithoutParens` equals `signature`, but with the surrounding
913920 * parentheses removed.
914921 */
922+ pragma [ nomagic]
915923private predicate elementSpecWithArguments0 (
916924 string signature , string type , string name , string signatureWithoutParens , string typeArgs ,
917925 string nameArgs
0 commit comments