@@ -503,6 +503,8 @@ class FunctionDeclarationEntry extends DeclarationEntry, @fun_decl {
503503 /** Gets the function which is being declared or defined. */
504504 override Function getDeclaration ( ) { result = getFunction ( ) }
505505
506+ override string getCanonicalQLClass ( ) { result = "FunctionDeclarationEntry" }
507+
506508 /** Gets the function which is being declared or defined. */
507509 Function getFunction ( ) { fun_decls ( underlyingElement ( this ) , unresolveElement ( result ) , _, _, _) }
508510
@@ -707,6 +709,8 @@ class TopLevelFunction extends Function {
707709 TopLevelFunction ( ) {
708710 not this .isMember ( )
709711 }
712+
713+ override string getCanonicalQLClass ( ) { result = "TopLevelFunction" }
710714}
711715
712716/**
@@ -718,6 +722,11 @@ class MemberFunction extends Function {
718722 this .isMember ( )
719723 }
720724
725+ override string getCanonicalQLClass ( )
726+ { not this instanceof CopyAssignmentOperator and
727+ not this instanceof MoveAssignmentOperator and
728+ result = "MemberFunction" }
729+
721730 /**
722731 * Gets the number of parameters of this function, including any implicit
723732 * `this` parameter.
@@ -769,6 +778,8 @@ class VirtualFunction extends MemberFunction {
769778 this .hasSpecifier ( "virtual" ) or purefunctions ( underlyingElement ( this ) )
770779 }
771780
781+ override string getCanonicalQLClass ( ) { result = "VirtualFunction" }
782+
772783 /** Holds if this virtual function is pure. */
773784 predicate isPure ( ) { this instanceof PureVirtualFunction }
774785
@@ -786,6 +797,7 @@ class PureVirtualFunction extends VirtualFunction {
786797
787798 PureVirtualFunction ( ) { purefunctions ( underlyingElement ( this ) ) }
788799
800+ override string getCanonicalQLClass ( ) { result = "PureVirtualFunction" }
789801}
790802
791803/**
@@ -797,6 +809,7 @@ class ConstMemberFunction extends MemberFunction {
797809
798810 ConstMemberFunction ( ) { this .hasSpecifier ( "const" ) }
799811
812+ override string getCanonicalQLClass ( ) { result = "ConstMemberFunction" }
800813}
801814
802815/**
@@ -806,6 +819,8 @@ class Constructor extends MemberFunction {
806819
807820 Constructor ( ) { functions ( underlyingElement ( this ) , _, 2 ) }
808821
822+ override string getCanonicalQLClass ( ) { result = "Constructor" }
823+
809824 /**
810825 * Holds if this constructor serves as a default constructor.
811826 *
@@ -851,6 +866,9 @@ class ConversionConstructor extends Constructor, ImplicitConversionFunction {
851866 and not ( this instanceof CopyConstructor )
852867 }
853868
869+ override string getCanonicalQLClass ( )
870+ { not this instanceof MoveConstructor and result = "ConversionConstructor" }
871+
854872 /** Gets the type this `ConversionConstructor` takes as input. */
855873 override Type getSourceType ( ) { result = this .getParameter ( 0 ) .getType ( ) }
856874
@@ -906,6 +924,8 @@ class CopyConstructor extends Constructor {
906924 not exists ( getATemplateArgument ( ) )
907925 }
908926
927+ override string getCanonicalQLClass ( ) { result = "CopyConstructor" }
928+
909929 /**
910930 * Holds if we cannot determine that this constructor will become a copy
911931 * constructor in all instantiations. Depending on template parameters of the
@@ -954,6 +974,8 @@ class MoveConstructor extends Constructor {
954974 not exists ( getATemplateArgument ( ) )
955975 }
956976
977+ override string getCanonicalQLClass ( ) { result = "MoveConstructor" }
978+
957979 /**
958980 * Holds if we cannot determine that this constructor will become a move
959981 * constructor in all instantiations. Depending on template parameters of the
@@ -986,6 +1008,8 @@ class NoArgConstructor extends Constructor {
9861008class Destructor extends MemberFunction {
9871009 Destructor ( ) { functions ( underlyingElement ( this ) , _, 3 ) }
9881010
1011+ override string getCanonicalQLClass ( ) { result = "Destructor" }
1012+
9891013 /**
9901014 * Gets a compiler-generated action which destructs a base class or member
9911015 * variable.
@@ -1011,6 +1035,8 @@ class ConversionOperator extends MemberFunction, ImplicitConversionFunction {
10111035
10121036 ConversionOperator ( ) { functions ( underlyingElement ( this ) , _, 4 ) }
10131037
1038+ override string getCanonicalQLClass ( ) { result = "ConversionOperator" }
1039+
10141040 override Type getSourceType ( ) { result = this .getDeclaringType ( ) }
10151041 override Type getDestType ( ) { result = this .getType ( ) }
10161042
@@ -1023,6 +1049,8 @@ class Operator extends Function {
10231049
10241050 Operator ( ) { functions ( underlyingElement ( this ) , _, 5 ) }
10251051
1052+ override string getCanonicalQLClass ( )
1053+ { not this instanceof MemberFunction and result = "Operator" }
10261054}
10271055
10281056/**
@@ -1045,6 +1073,8 @@ class CopyAssignmentOperator extends Operator {
10451073 not exists ( this .getParameter ( 1 ) ) and
10461074 not exists ( getATemplateArgument ( ) )
10471075 }
1076+
1077+ override string getCanonicalQLClass ( ) { result = "CopyAssignmentOperator" }
10481078}
10491079
10501080
@@ -1064,6 +1094,8 @@ class MoveAssignmentOperator extends Operator {
10641094 not exists ( this .getParameter ( 1 ) ) and
10651095 not exists ( getATemplateArgument ( ) )
10661096 }
1097+
1098+ override string getCanonicalQLClass ( ) { result = "MoveAssignmentOperator" }
10671099}
10681100
10691101
@@ -1084,6 +1116,7 @@ class MoveAssignmentOperator extends Operator {
10841116class TemplateFunction extends Function {
10851117 TemplateFunction ( ) { is_function_template ( underlyingElement ( this ) ) and exists ( getATemplateArgument ( ) ) }
10861118
1119+ override string getCanonicalQLClass ( ) { result = "TemplateFunction" }
10871120 /**
10881121 * Gets a compiler-generated instantiation of this function template.
10891122 */
@@ -1115,6 +1148,8 @@ class FunctionTemplateInstantiation extends Function {
11151148 tf .getAnInstantiation ( ) = this
11161149 }
11171150
1151+ override string getCanonicalQLClass ( ) { result = "FunctionTemplateInstantiation" }
1152+
11181153 /**
11191154 * Gets the function template from which this instantiation was instantiated.
11201155 *
@@ -1151,6 +1186,8 @@ class FunctionTemplateSpecialization extends Function {
11511186 this .isSpecialization ( )
11521187 }
11531188
1189+ override string getCanonicalQLClass ( ) { result = "FunctionTemplateSpecialization" }
1190+
11541191 /**
11551192 * Gets the primary template for the specialization (the function template
11561193 * this specializes).
0 commit comments