@@ -12,7 +12,7 @@ private import semmle.code.cpp.internal.Type
1212 */
1313class Class extends UserType {
1414 Class ( ) {
15- isClass ( unresolveElement ( this ) )
15+ isClass ( underlyingElement ( this ) )
1616 }
1717
1818 /** Gets a child declaration of this class. */
@@ -75,7 +75,7 @@ class Class extends UserType {
7575 * If you also want template instantiations of results, see
7676 * `getAMember(int)`.
7777 */
78- Declaration getCanonicalMember ( int index ) { member ( unresolveElement ( this ) , index , unresolveElement ( result ) ) }
78+ Declaration getCanonicalMember ( int index ) { member ( underlyingElement ( this ) , index , unresolveElement ( result ) ) }
7979
8080 /**
8181 * Gets the (zero-based) `index`th canonical member declared in this
@@ -94,7 +94,7 @@ class Class extends UserType {
9494 * DEPRECATED: Use `getCanonicalMember(int)` or `getAMember(int)` instead.
9595 * Gets the `index`th member of this class.
9696 */
97- deprecated Declaration getMember ( int index ) { member ( unresolveElement ( this ) , index , unresolveElement ( result ) ) }
97+ deprecated Declaration getMember ( int index ) { member ( underlyingElement ( this ) , index , unresolveElement ( result ) ) }
9898
9999 /**
100100 * DEPRECATED: As this includes a somewhat arbitrary number of
@@ -416,7 +416,7 @@ class Class extends UserType {
416416 * compiled for. For this reason, the `is_pod_class` predicate is
417417 * generated by the extractor.
418418 */
419- predicate isPOD ( ) { is_pod_class ( unresolveElement ( this ) ) }
419+ predicate isPOD ( ) { is_pod_class ( underlyingElement ( this ) ) }
420420
421421 /**
422422 * Holds if this class is abstract, in other words whether it declares one
@@ -513,7 +513,7 @@ class Class extends UserType {
513513 * classes.
514514 */
515515 int getVirtualBaseClassByteOffset ( Class base ) {
516- virtual_base_offsets ( unresolveElement ( this ) , unresolveElement ( base ) , result )
516+ virtual_base_offsets ( underlyingElement ( this ) , unresolveElement ( base ) , result )
517517 }
518518
519519 /**
@@ -566,15 +566,15 @@ class Class extends UserType {
566566 * The alignment of this type in bytes (on the machine where facts were
567567 * extracted).
568568 */
569- int getAlignment ( ) { usertypesize ( unresolveElement ( this ) , _, result ) }
569+ int getAlignment ( ) { usertypesize ( underlyingElement ( this ) , _, result ) }
570570
571571 /**
572572 * Holds if this class is constructed from another class as a result of
573573 * template instantiation. It originates either from a class template or
574574 * from a class nested in a class template.
575575 */
576576 predicate isConstructedFrom ( Class c ) {
577- class_instantiation ( unresolveElement ( this ) , unresolveElement ( c ) )
577+ class_instantiation ( underlyingElement ( this ) , unresolveElement ( c ) )
578578 }
579579
580580 /**
@@ -597,7 +597,7 @@ class Class extends UserType {
597597 * `i`th template parameter.
598598 */
599599 Type getTemplateArgument ( int i ) {
600- class_template_argument ( unresolveElement ( this ) , i , unresolveElement ( result ) )
600+ class_template_argument ( underlyingElement ( this ) , i , unresolveElement ( result ) )
601601 }
602602
603603 /**
@@ -614,7 +614,7 @@ class Class extends UserType {
614614
615615 /** Holds if this class was declared 'final'. */
616616 predicate isFinal ( ) {
617- usertype_final ( unresolveElement ( this ) )
617+ usertype_final ( underlyingElement ( this ) )
618618 }
619619
620620 /** Gets a link target which references this class. */
@@ -631,7 +631,7 @@ class Class extends UserType {
631631 * using lowercase letters (e.g. "01234567-89ab-cdef-0123-456789abcdef").
632632 */
633633 string getUuid ( ) {
634- usertype_uuid ( unresolveElement ( this ) , result )
634+ usertype_uuid ( underlyingElement ( this ) , result )
635635 }
636636
637637 private Type getAFieldSubobjectType ( ) {
@@ -764,7 +764,7 @@ class ClassDerivation extends Locatable, @derivation {
764764 * struct D : T {};
765765 */
766766 Type getBaseType ( ) {
767- derivations ( unresolveElement ( this ) , _, _, unresolveElement ( result ) , _)
767+ derivations ( underlyingElement ( this ) , _, _, unresolveElement ( result ) , _)
768768 }
769769
770770 /**
@@ -775,7 +775,7 @@ class ClassDerivation extends Locatable, @derivation {
775775 * struct D : B {};
776776 */
777777 Class getDerivedClass ( ) {
778- derivations ( unresolveElement ( this ) , unresolveElement ( result ) , _, _, _)
778+ derivations ( underlyingElement ( this ) , unresolveElement ( result ) , _, _, _)
779779 }
780780
781781 /**
@@ -784,12 +784,12 @@ class ClassDerivation extends Locatable, @derivation {
784784 * derivation of B2 in "struct D : B1, B2 { ... };" would be 1.
785785 */
786786 int getIndex ( ) {
787- derivations ( unresolveElement ( this ) , _, result , _, _)
787+ derivations ( underlyingElement ( this ) , _, result , _, _)
788788 }
789789
790790 /** Gets a specifier (for example "public") applied to the derivation. */
791791 Specifier getASpecifier ( ) {
792- derspecifiers ( unresolveElement ( this ) , unresolveElement ( result ) )
792+ derspecifiers ( underlyingElement ( this ) , unresolveElement ( result ) )
793793 }
794794
795795 /** Holds if the derivation has specifier `s`. */
@@ -804,7 +804,7 @@ class ClassDerivation extends Locatable, @derivation {
804804
805805 /** Gets the location of the derivation. */
806806 override Location getLocation ( ) {
807- derivations ( unresolveElement ( this ) , _, _, _, result )
807+ derivations ( underlyingElement ( this ) , _, _, _, result )
808808 }
809809
810810 /**
@@ -816,7 +816,7 @@ class ClassDerivation extends Locatable, @derivation {
816816 * classes.
817817 */
818818 int getByteOffset ( ) {
819- direct_base_offsets ( unresolveElement ( this ) , result )
819+ direct_base_offsets ( underlyingElement ( this ) , result )
820820 }
821821
822822 override string toString ( ) {
@@ -869,7 +869,7 @@ class AbstractClass extends Class {
869869 * of class templates).
870870 */
871871class TemplateClass extends Class {
872- TemplateClass ( ) { usertypes ( unresolveElement ( this ) , _, 6 ) }
872+ TemplateClass ( ) { usertypes ( underlyingElement ( this ) , _, 6 ) }
873873 Class getAnInstantiation ( ) {
874874 result .isConstructedFrom ( this ) and
875875 exists ( result .getATemplateArgument ( ) )
@@ -998,7 +998,7 @@ class VirtualBaseClass extends Class {
998998 */
999999class ProxyClass extends UserType {
10001000 ProxyClass ( ) {
1001- usertypes ( unresolveElement ( this ) , _, 9 )
1001+ usertypes ( underlyingElement ( this ) , _, 9 )
10021002 }
10031003
10041004 /** Gets the location of the proxy class. */
@@ -1008,7 +1008,7 @@ class ProxyClass extends UserType {
10081008
10091009 /** Gets the template parameter for which this is the proxy class. */
10101010 TemplateParameter getTemplateParameter ( ) {
1011- is_proxy_class_for ( unresolveElement ( this ) , unresolveElement ( result ) )
1011+ is_proxy_class_for ( underlyingElement ( this ) , unresolveElement ( result ) )
10121012 }
10131013}
10141014
0 commit comments