File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
codeql/swift/elements/decl Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ private import codeql.swift.elements.decl.ClassDecl
2
+ private import codeql.swift.elements.decl.StructDecl
3
+ private import codeql.swift.elements.decl.NominalTypeDecl
4
+
5
+ /**
6
+ * A `class` or `struct` declaration. For example `MyStruct` or `MyClass` in the following example:
7
+ * ```swift
8
+ * struct MyStruct {
9
+ * // ...
10
+ * }
11
+ *
12
+ * class MyClass {
13
+ * // ...
14
+ * }
15
+ * ```
16
+ */
17
+ class ClassOrStructDecl extends NominalTypeDecl {
18
+ ClassOrStructDecl ( ) {
19
+ this instanceof ClassDecl
20
+ or
21
+ this instanceof StructDecl
22
+ }
23
+ }
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ import codeql.swift.elements
4
4
import codeql.swift.elements.expr.ArithmeticOperation
5
5
import codeql.swift.elements.expr.LogicalOperation
6
6
import codeql.swift.elements.decl.MethodDecl
7
+ import codeql.swift.elements.decl.ClassOrStructDecl
You can’t perform that action at this time.
0 commit comments