-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathDiagnostics.qll
More file actions
29 lines (26 loc) · 835 Bytes
/
Diagnostics.qll
File metadata and controls
29 lines (26 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import cpp
/**
* A syntax error.
*/
class SyntaxError extends CompilerError {
SyntaxError() {
this.getTag().matches("exp_%") or
this.getTag() =
[
"bad_data_member_initialization", "bad_pure_specifier", "bad_return", "bad_uuid_string",
"literal_without_initializer", "missing_class_definition", "missing_exception_declaration",
"nonstd_const_member_decl_not_allowed", "operator_name_not_allowed",
"wide_string_invalid_in_asm"
]
}
}
/**
* A cannot open file error.
* Typically this is due to a missing include.
*/
class CannotOpenFileError extends CompilerError {
CannotOpenFileError() { this.hasTag(["cannot_open_file", "cannot_open_file_reason"]) }
string getIncludedFile() {
result = this.getMessage().regexpCapture("cannot open source file '([^']+)'", 1)
}
}