@@ -12,7 +12,7 @@ private import semmle.code.cpp.internal.Type
12
12
*/
13
13
class Class extends UserType {
14
14
Class ( ) {
15
- isClass ( unresolveElement ( this ) )
15
+ isClass ( underlyingElement ( this ) )
16
16
}
17
17
18
18
/** Gets a child declaration of this class. */
@@ -75,7 +75,7 @@ class Class extends UserType {
75
75
* If you also want template instantiations of results, see
76
76
* `getAMember(int)`.
77
77
*/
78
- Declaration getCanonicalMember ( int index ) { member ( unresolveElement ( this ) , index , unresolveElement ( result ) ) }
78
+ Declaration getCanonicalMember ( int index ) { member ( underlyingElement ( this ) , index , unresolveElement ( result ) ) }
79
79
80
80
/**
81
81
* Gets the (zero-based) `index`th canonical member declared in this
@@ -94,7 +94,7 @@ class Class extends UserType {
94
94
* DEPRECATED: Use `getCanonicalMember(int)` or `getAMember(int)` instead.
95
95
* Gets the `index`th member of this class.
96
96
*/
97
- deprecated Declaration getMember ( int index ) { member ( unresolveElement ( this ) , index , unresolveElement ( result ) ) }
97
+ deprecated Declaration getMember ( int index ) { member ( underlyingElement ( this ) , index , unresolveElement ( result ) ) }
98
98
99
99
/**
100
100
* DEPRECATED: As this includes a somewhat arbitrary number of
@@ -416,7 +416,7 @@ class Class extends UserType {
416
416
* compiled for. For this reason, the `is_pod_class` predicate is
417
417
* generated by the extractor.
418
418
*/
419
- predicate isPOD ( ) { is_pod_class ( unresolveElement ( this ) ) }
419
+ predicate isPOD ( ) { is_pod_class ( underlyingElement ( this ) ) }
420
420
421
421
/**
422
422
* Holds if this class is abstract, in other words whether it declares one
@@ -513,7 +513,7 @@ class Class extends UserType {
513
513
* classes.
514
514
*/
515
515
int getVirtualBaseClassByteOffset ( Class base ) {
516
- virtual_base_offsets ( unresolveElement ( this ) , unresolveElement ( base ) , result )
516
+ virtual_base_offsets ( underlyingElement ( this ) , unresolveElement ( base ) , result )
517
517
}
518
518
519
519
/**
@@ -566,15 +566,15 @@ class Class extends UserType {
566
566
* The alignment of this type in bytes (on the machine where facts were
567
567
* extracted).
568
568
*/
569
- int getAlignment ( ) { usertypesize ( unresolveElement ( this ) , _, result ) }
569
+ int getAlignment ( ) { usertypesize ( underlyingElement ( this ) , _, result ) }
570
570
571
571
/**
572
572
* Holds if this class is constructed from another class as a result of
573
573
* template instantiation. It originates either from a class template or
574
574
* from a class nested in a class template.
575
575
*/
576
576
predicate isConstructedFrom ( Class c ) {
577
- class_instantiation ( unresolveElement ( this ) , unresolveElement ( c ) )
577
+ class_instantiation ( underlyingElement ( this ) , unresolveElement ( c ) )
578
578
}
579
579
580
580
/**
@@ -597,7 +597,7 @@ class Class extends UserType {
597
597
* `i`th template parameter.
598
598
*/
599
599
Type getTemplateArgument ( int i ) {
600
- class_template_argument ( unresolveElement ( this ) , i , unresolveElement ( result ) )
600
+ class_template_argument ( underlyingElement ( this ) , i , unresolveElement ( result ) )
601
601
}
602
602
603
603
/**
@@ -614,7 +614,7 @@ class Class extends UserType {
614
614
615
615
/** Holds if this class was declared 'final'. */
616
616
predicate isFinal ( ) {
617
- usertype_final ( unresolveElement ( this ) )
617
+ usertype_final ( underlyingElement ( this ) )
618
618
}
619
619
620
620
/** Gets a link target which references this class. */
@@ -631,7 +631,7 @@ class Class extends UserType {
631
631
* using lowercase letters (e.g. "01234567-89ab-cdef-0123-456789abcdef").
632
632
*/
633
633
string getUuid ( ) {
634
- usertype_uuid ( unresolveElement ( this ) , result )
634
+ usertype_uuid ( underlyingElement ( this ) , result )
635
635
}
636
636
637
637
private Type getAFieldSubobjectType ( ) {
@@ -764,7 +764,7 @@ class ClassDerivation extends Locatable, @derivation {
764
764
* struct D : T {};
765
765
*/
766
766
Type getBaseType ( ) {
767
- derivations ( unresolveElement ( this ) , _, _, unresolveElement ( result ) , _)
767
+ derivations ( underlyingElement ( this ) , _, _, unresolveElement ( result ) , _)
768
768
}
769
769
770
770
/**
@@ -775,7 +775,7 @@ class ClassDerivation extends Locatable, @derivation {
775
775
* struct D : B {};
776
776
*/
777
777
Class getDerivedClass ( ) {
778
- derivations ( unresolveElement ( this ) , unresolveElement ( result ) , _, _, _)
778
+ derivations ( underlyingElement ( this ) , unresolveElement ( result ) , _, _, _)
779
779
}
780
780
781
781
/**
@@ -784,12 +784,12 @@ class ClassDerivation extends Locatable, @derivation {
784
784
* derivation of B2 in "struct D : B1, B2 { ... };" would be 1.
785
785
*/
786
786
int getIndex ( ) {
787
- derivations ( unresolveElement ( this ) , _, result , _, _)
787
+ derivations ( underlyingElement ( this ) , _, result , _, _)
788
788
}
789
789
790
790
/** Gets a specifier (for example "public") applied to the derivation. */
791
791
Specifier getASpecifier ( ) {
792
- derspecifiers ( unresolveElement ( this ) , unresolveElement ( result ) )
792
+ derspecifiers ( underlyingElement ( this ) , unresolveElement ( result ) )
793
793
}
794
794
795
795
/** Holds if the derivation has specifier `s`. */
@@ -804,7 +804,7 @@ class ClassDerivation extends Locatable, @derivation {
804
804
805
805
/** Gets the location of the derivation. */
806
806
override Location getLocation ( ) {
807
- derivations ( unresolveElement ( this ) , _, _, _, result )
807
+ derivations ( underlyingElement ( this ) , _, _, _, result )
808
808
}
809
809
810
810
/**
@@ -816,7 +816,7 @@ class ClassDerivation extends Locatable, @derivation {
816
816
* classes.
817
817
*/
818
818
int getByteOffset ( ) {
819
- direct_base_offsets ( unresolveElement ( this ) , result )
819
+ direct_base_offsets ( underlyingElement ( this ) , result )
820
820
}
821
821
822
822
override string toString ( ) {
@@ -869,7 +869,7 @@ class AbstractClass extends Class {
869
869
* of class templates).
870
870
*/
871
871
class TemplateClass extends Class {
872
- TemplateClass ( ) { usertypes ( unresolveElement ( this ) , _, 6 ) }
872
+ TemplateClass ( ) { usertypes ( underlyingElement ( this ) , _, 6 ) }
873
873
Class getAnInstantiation ( ) {
874
874
result .isConstructedFrom ( this ) and
875
875
exists ( result .getATemplateArgument ( ) )
@@ -998,7 +998,7 @@ class VirtualBaseClass extends Class {
998
998
*/
999
999
class ProxyClass extends UserType {
1000
1000
ProxyClass ( ) {
1001
- usertypes ( unresolveElement ( this ) , _, 9 )
1001
+ usertypes ( underlyingElement ( this ) , _, 9 )
1002
1002
}
1003
1003
1004
1004
/** Gets the location of the proxy class. */
@@ -1008,7 +1008,7 @@ class ProxyClass extends UserType {
1008
1008
1009
1009
/** Gets the template parameter for which this is the proxy class. */
1010
1010
TemplateParameter getTemplateParameter ( ) {
1011
- is_proxy_class_for ( unresolveElement ( this ) , unresolveElement ( result ) )
1011
+ is_proxy_class_for ( underlyingElement ( this ) , unresolveElement ( result ) )
1012
1012
}
1013
1013
}
1014
1014
0 commit comments