Skip to content

Commit 067ecde

Browse files
committed
C++: Match more tags
1 parent 9a81ce8 commit 067ecde

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

cpp/ql/src/Telemetry/Diagnostics.qll

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,24 @@ import cpp
44
* A syntax error.
55
*/
66
class SyntaxError extends CompilerError {
7-
SyntaxError() { this.getTag().matches("exp_%") }
7+
SyntaxError() {
8+
this.getTag().matches("exp_%") or
9+
this.getTag() =
10+
[
11+
"bad_data_member_initialization", "bad_pure_specifier", "bad_return", "bad_uuid_string",
12+
"literal_without_initializer", "missing_class_definition", "missing_exception_declaration",
13+
"nonstd_const_member_decl_not_allowed", "operator_name_not_allowed",
14+
"wide_string_invalid_in_asm"
15+
]
16+
}
817
}
918

1019
/**
1120
* A cannot open file error.
1221
* Typically this is due to a missing include.
1322
*/
1423
class CannotOpenFile extends CompilerError {
15-
CannotOpenFile() { this.hasTag("cannot_open_file") }
24+
CannotOpenFile() { this.hasTag(["cannot_open_file", "cannot_open_file_reason"]) }
1625

1726
string getIncludedFile() {
1827
result = this.getMessage().regexpCapture("cannot open source file '([^']+)'", 1)

0 commit comments

Comments
 (0)