11private import codeql.swift.generated.decl.EnumElementDecl
2- private import codeql.swift.elements.decl.Decl
2+ private import codeql.swift.elements.decl.EnumDecl
33
44/**
55 * An enum element declaration, for example `enumElement` and `anotherEnumElement` in:
@@ -14,25 +14,24 @@ class EnumElementDecl extends Generated::EnumElementDecl {
1414 override string toString ( ) { result = this .getName ( ) }
1515
1616 /**
17- * Holds if this function is called `funcName ` and is a member of a
18- * class, struct, extension, enum or protocol called `typeName `.
17+ * Holds if this enum element declaration is called `enumElementName ` and is a member of an
18+ * enum called `enumName `.
1919 */
2020 cached
21- predicate hasQualifiedName ( string typeName , string enumElementName ) {
21+ predicate hasQualifiedName ( string enumName , string enumElementName ) {
2222 this .getName ( ) = enumElementName and
23- exists ( Decl d |
24- d .asNominalTypeDecl ( ) . getFullName ( ) = typeName and
23+ exists ( EnumDecl d |
24+ d .getFullName ( ) = enumName and
2525 d .getAMember ( ) = this
2626 )
2727 }
2828
2929 /**
30- * Holds if this function is called `funcName` and is a member of a
31- * class, struct, extension, enum or protocol called `typeName` in a module
32- * called `moduleName`.
30+ * Holds if this enum element declaration is called `enumElementName` and is a member of an
31+ * enumcalled `enumName` in a module called `moduleName`.
3332 */
34- predicate hasQualifiedName ( string moduleName , string typeName , string enumElementName ) {
35- this .hasQualifiedName ( typeName , enumElementName ) and
33+ predicate hasQualifiedName ( string moduleName , string enumName , string enumElementName ) {
34+ this .hasQualifiedName ( enumName , enumElementName ) and
3635 this .getModule ( ) .getFullName ( ) = moduleName
3736 }
3837}
0 commit comments