Rename Constant::As to Constant::ValueAs.

This CL updates Constant::As to be Constant::ValueAs. Now that Constant
inherits from CastableBase, there is already an As method on
CastableBase. This makes the override inside Constant confusing and
potentially incorrect.

Bug: tint:1718
Change-Id: I4f73971801e95225a99a5a993124c04194d0d7d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114360
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair
2022-12-14 20:46:32 +00:00
committed by Dawn LUCI CQ
parent 35842190ef
commit 5addefb148
20 changed files with 401 additions and 401 deletions

View File

@@ -62,7 +62,7 @@ class Constant : public Castable<Constant, Node> {
/// @returns the value of the constant as the given scalar or abstract value.
template <typename T>
T As() const {
T ValueAs() const {
return std::visit(
[](auto v) {
if constexpr (std::is_same_v<decltype(v), std::monostate>) {