mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +00:00
Diagnostics: Add error code to the Diagnostic
Allows this to be formatted similarly to the severity. Change-Id: I74cd863d8f1d94089ce753ab76a2c70784eb5553 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33938 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
61ec48b99e
commit
f32a3c1f35
@@ -58,6 +58,12 @@ class ValidatorImpl {
|
||||
/// @returns true if an error was encountered
|
||||
bool has_error() const { return diags_.contains_errors(); }
|
||||
|
||||
/// Appends an error at @p src with the code @p code and message @p msg
|
||||
/// @param src the source causing the error
|
||||
/// @param code the validation error code
|
||||
/// @param msg the error message
|
||||
void add_error(const Source& src, const char* code, const std::string& msg);
|
||||
|
||||
/// Appends an error at @p src with the message @p msg
|
||||
/// @param src the source causing the error
|
||||
/// @param msg the error message
|
||||
|
||||
Reference in New Issue
Block a user