File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
swift/ql/lib/codeql/swift/elements Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
private import codeql.swift.generated.Diagnostics
2
2
3
+ /**
4
+ * A compiler-generated error, warning, note or remark.
5
+ */
3
6
class Diagnostics extends Generated:: Diagnostics {
4
7
override string toString ( ) { result = this .getSeverity ( ) + ": " + this .getText ( ) }
5
8
9
+ /**
10
+ * Gets a string representing the severity of this compiler diagnostic.
11
+ */
6
12
string getSeverity ( ) {
7
13
this .getKind ( ) = 1 and result = "error"
8
14
or
@@ -14,18 +20,30 @@ class Diagnostics extends Generated::Diagnostics {
14
20
}
15
21
}
16
22
23
+ /**
24
+ * A compiler error message.
25
+ */
17
26
class CompilerError extends Diagnostics {
18
27
CompilerError ( ) { this .getSeverity ( ) = "error" }
19
28
}
20
29
30
+ /**
31
+ * A compiler-generated warning.
32
+ */
21
33
class CompilerWarning extends Diagnostics {
22
34
CompilerWarning ( ) { this .getSeverity ( ) = "warning" }
23
35
}
24
36
37
+ /**
38
+ * A compiler-generated note (typically attached to an error or warning).
39
+ */
25
40
class CompilerNote extends Diagnostics {
26
41
CompilerNote ( ) { this .getSeverity ( ) = "note" }
27
42
}
28
43
44
+ /**
45
+ * A compiler-generated remark (milder than a warning, this does not indicate an issue).
46
+ */
29
47
class CompilerRemark extends Diagnostics {
30
48
CompilerRemark ( ) { this .getSeverity ( ) = "remark" }
31
49
}
You can’t perform that action at this time.
0 commit comments