mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
C++: Match more tags
This commit is contained in:
@@ -4,7 +4,16 @@ import cpp
|
||||
* A syntax error.
|
||||
*/
|
||||
class SyntaxError extends CompilerError {
|
||||
SyntaxError() { this.getTag().matches("exp_%") }
|
||||
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12,7 +21,7 @@ class SyntaxError extends CompilerError {
|
||||
* Typically this is due to a missing include.
|
||||
*/
|
||||
class CannotOpenFile extends CompilerError {
|
||||
CannotOpenFile() { this.hasTag("cannot_open_file") }
|
||||
CannotOpenFile() { this.hasTag(["cannot_open_file", "cannot_open_file_reason"]) }
|
||||
|
||||
string getIncludedFile() {
|
||||
result = this.getMessage().regexpCapture("cannot open source file '([^']+)'", 1)
|
||||
|
||||
Reference in New Issue
Block a user