Add deprecated proxy methods.
A few of the diagnostic methods are being used by downstream projects.
this CL adds the needed proxy methods in order to unblock the roll and
allow the projects time to update.
Change-Id: I4c05e4c22fcb7721a008ab8619752ffaeb6512d2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/173740
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/tint/utils/diagnostic/diagnostic.h b/src/tint/utils/diagnostic/diagnostic.h
index ac5c42a..fc4438d 100644
--- a/src/tint/utils/diagnostic/diagnostic.h
+++ b/src/tint/utils/diagnostic/diagnostic.h
@@ -252,6 +252,8 @@
/// @returns true iff the diagnostic list contains errors diagnostics (or of
/// higher severity).
bool ContainsErrors() const { return error_count_ > 0; }
+ /// deprecated, use `ContainsErrors`
+ bool contains_errors() const { return ContainsErrors(); }
/// @returns the number of error diagnostics (or of higher severity).
size_t NumErrors() const { return error_count_; }
/// @returns the number of entries in the list.
diff --git a/src/tint/utils/diagnostic/formatter.h b/src/tint/utils/diagnostic/formatter.h
index 63da5e2..1841fe0 100644
--- a/src/tint/utils/diagnostic/formatter.h
+++ b/src/tint/utils/diagnostic/formatter.h
@@ -69,6 +69,8 @@
/// @return the list of diagnostics `list` formatted to a string.
/// @param list the list of diagnostic messages to format
std::string Format(const List& list) const;
+ /// deprecated, use `Format`
+ std::string format(const List& list) const { return Format(list); }
private:
struct State;