Remove ast::AccessControl::kInvalid

Also spruce up texture validation tests so that they validate error
messages.

Bug: tint:805
Change-Id: I6c86fc16014b127a7ef8254e5badf9b5bed08623
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51860
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Antonio Maiorano
2021-05-21 14:32:38 +00:00
committed by Tint LUCI CQ
parent ee0b69ce53
commit 6cf7f2eca5
12 changed files with 162 additions and 139 deletions

View File

@@ -37,9 +37,6 @@ AccessControl::~AccessControl() = default;
std::string AccessControl::type_name() const {
std::string name = "__access_control_";
switch (access_) {
case ast::AccessControl::kInvalid:
name += "invalid";
break;
case ast::AccessControl::kReadOnly:
name += "read_only";
break;
@@ -57,9 +54,6 @@ std::string AccessControl::FriendlyName(const SymbolTable& symbols) const {
std::ostringstream out;
out << "[[access(";
switch (access_) {
case ast::AccessControl::kInvalid:
out << "invalid";
break;
case ast::AccessControl::kReadOnly:
out << "read";
break;
@@ -83,10 +77,6 @@ AccessControl* AccessControl::Clone(CloneContext* ctx) const {
std::ostream& operator<<(std::ostream& out, AccessControl::Access access) {
switch (access) {
case ast::AccessControl::kInvalid: {
out << "invalid";
break;
}
case ast::AccessControl::kReadOnly: {
out << "read_only";
break;

View File

@@ -28,9 +28,6 @@ class AccessControl : public Castable<AccessControl, Type> {
public:
/// The access control settings
enum Access {
/// Invalid
// TODO(crbug.com/tint/805): Remove this.
kInvalid = -1,
/// Read only
kReadOnly,
/// Write only