@@ -30,8 +30,10 @@ class TupleFieldContent extends FieldContent, TTupleFieldContent {
30
30
31
31
TupleFieldContent ( ) { this = TTupleFieldContent ( field ) }
32
32
33
+ /** Holds if this field belongs to an enum variant. */
33
34
predicate isVariantField ( Variant v , int pos ) { field .isVariantField ( v , pos ) }
34
35
36
+ /** Holds if this field belongs to a struct. */
35
37
predicate isStructField ( Struct s , int pos ) { field .isStructField ( s , pos ) }
36
38
37
39
override FieldExprCfgNode getAnAccess ( ) { field = result .getFieldExpr ( ) .getTupleField ( ) }
@@ -61,8 +63,10 @@ class RecordFieldContent extends FieldContent, TRecordFieldContent {
61
63
62
64
RecordFieldContent ( ) { this = TRecordFieldContent ( field ) }
63
65
66
+ /** Holds if this field belongs to an enum variant. */
64
67
predicate isVariantField ( Variant v , string name ) { field .isVariantField ( v , name ) }
65
68
69
+ /** Holds if this field belongs to a struct. */
66
70
predicate isStructField ( Struct s , string name ) { field .isStructField ( s , name ) }
67
71
68
72
override FieldExprCfgNode getAnAccess ( ) { field = result .getFieldExpr ( ) .getRecordField ( ) }
@@ -141,6 +145,7 @@ final class TuplePositionContent extends FieldContent, TTuplePositionContent {
141
145
142
146
TuplePositionContent ( ) { this = TTuplePositionContent ( pos ) }
143
147
148
+ /** Gets the index of this tuple position. */
144
149
int getPosition ( ) { result = pos }
145
150
146
151
override FieldExprCfgNode getAnAccess ( ) {
0 commit comments