Skip to content

Commit 6a816ba

Browse files
committed
Swift: create common error test directory
1 parent c5bb32d commit 6a816ba

File tree

9 files changed

+48
-0
lines changed

9 files changed

+48
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
2+
private import codeql.swift.generated.ErrorElement
3+
4+
class ErrorElement extends Generated::ErrorElement { }
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// generated by codegen/codegen.py
2+
private import codeql.swift.generated.Synth
3+
private import codeql.swift.generated.Raw
4+
import codeql.swift.elements.Locatable
5+
6+
module Generated {
7+
/**
8+
* The superclass of all elements indicating some kind of error.
9+
*/
10+
class ErrorElement extends Synth::TErrorElement, Locatable { }
11+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
| file://:0:0:0:0 | (no string representation) | ErrorType |
2+
| file://:0:0:0:0 | ... .combine(_:) | UnresolvedDotExpr |
3+
| overloaded.swift:6:5:6:5 | OverloadedDeclRefExpr | OverloadedDeclRefExpr |
4+
| unresolved.swift:5:1:5:14 | UnresolvedSpecializeExpr | UnresolvedSpecializeExpr |
5+
| unspecified.swift:3:1:3:23 | missing extended_type_decl from ExtensionDecl | UnspecifiedElement |
6+
| unspecified.swift:9:9:9:9 | missing fallthrough_dest from FallthroughStmt | UnspecifiedElement |
7+
| unspecified.swift:9:9:9:9 | missing fallthrough_source from FallthroughStmt | UnspecifiedElement |
8+
| unspecified.swift:12:18:12:21 | missing element from EnumElementPattern | UnspecifiedElement |
9+
| unspecified.swift:14:18:14:26 | missing element from EnumElementPattern | UnspecifiedElement |
10+
| unspecified.swift:19:18:19:19 | missing element from EnumElementPattern | UnspecifiedElement |
11+
| unspecified.swift:22:13:22:13 | missing fallthrough_dest from FallthroughStmt | UnspecifiedElement |
12+
| unspecified.swift:22:13:22:13 | missing fallthrough_source from FallthroughStmt | UnspecifiedElement |
13+
| unspecified.swift:25:16:25:16 | ErrorExpr | ErrorExpr |
14+
| unspecified.swift:26:18:26:19 | missing element from EnumElementPattern | UnspecifiedElement |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import swift
2+
3+
from Locatable e
4+
where e instanceof ErrorElement
5+
select e, e.getPrimaryQlClasses()
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
| unspecified.swift:3:1:3:23 | extension | unspecified.swift:3:1:3:23 | missing extended_type_decl from ExtensionDecl |
2+
| unspecified.swift:9:9:9:9 | fallthrough | unspecified.swift:9:9:9:9 | missing fallthrough_dest from FallthroughStmt |
3+
| unspecified.swift:9:9:9:9 | fallthrough | unspecified.swift:9:9:9:9 | missing fallthrough_source from FallthroughStmt |
4+
| unspecified.swift:12:18:12:21 | (no string representation) | unspecified.swift:12:18:12:21 | missing element from EnumElementPattern |
5+
| unspecified.swift:14:18:14:26 | (no string representation) | unspecified.swift:14:18:14:26 | missing element from EnumElementPattern |
6+
| unspecified.swift:19:18:19:19 | (no string representation) | unspecified.swift:19:18:19:19 | missing element from EnumElementPattern |
7+
| unspecified.swift:22:13:22:13 | fallthrough | unspecified.swift:22:13:22:13 | missing fallthrough_dest from FallthroughStmt |
8+
| unspecified.swift:22:13:22:13 | fallthrough | unspecified.swift:22:13:22:13 | missing fallthrough_source from FallthroughStmt |
9+
| unspecified.swift:26:18:26:19 | (no string representation) | unspecified.swift:26:18:26:19 | missing element from EnumElementPattern |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import swift
2+
3+
from UnspecifiedElement e, Locatable parent
4+
where parent = e.getParent()
5+
select parent, e

0 commit comments

Comments
 (0)