Rename TypeFlags and TypeFlag.

This CL updates TypeFlags and TypeFlag to drop the Type prefix.

Bug: tint:1718
Change-Id: Ia197c867e39102582ba3314b7b3f24d8bec89712
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113801
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
diff --git a/src/tint/resolver/intrinsic_table.cc b/src/tint/resolver/intrinsic_table.cc
index f6b87f3..e6fd3df 100644
--- a/src/tint/resolver/intrinsic_table.cc
+++ b/src/tint/resolver/intrinsic_table.cc
@@ -57,7 +57,7 @@
 /// A special type that matches all TypeMatchers
 class Any final : public Castable<Any, type::Type> {
   public:
-    Any() : Base(type::TypeFlags{}) {}
+    Any() : Base(type::Flags{}) {}
     ~Any() override = default;
 
     // Stub implementations for type::Type conformance.
diff --git a/src/tint/type/abstract_numeric.cc b/src/tint/type/abstract_numeric.cc
index b689153..390488e 100644
--- a/src/tint/type/abstract_numeric.cc
+++ b/src/tint/type/abstract_numeric.cc
@@ -19,7 +19,7 @@
 namespace tint::type {
 
 AbstractNumeric::AbstractNumeric()
-    : Base(TypeFlags{
+    : Base(type::Flags{
           Flag::kConstructable,
           Flag::kCreationFixedFootprint,
           Flag::kFixedFootprint,
diff --git a/src/tint/type/array.cc b/src/tint/type/array.cc
index f8b2e0f..ad903fa 100644
--- a/src/tint/type/array.cc
+++ b/src/tint/type/array.cc
@@ -27,20 +27,20 @@
 
 namespace {
 
-TypeFlags FlagsFrom(const Type* element, const ArrayCount* count) {
-    TypeFlags flags;
+type::Flags FlagsFrom(const Type* element, const ArrayCount* count) {
+    type::Flags flags;
     // Only constant-expression sized arrays are constructible
     if (count->Is<ConstantArrayCount>()) {
         if (element->IsConstructible()) {
-            flags.Add(TypeFlag::kConstructable);
+            flags.Add(Flag::kConstructable);
         }
         if (element->HasCreationFixedFootprint()) {
-            flags.Add(TypeFlag::kCreationFixedFootprint);
+            flags.Add(Flag::kCreationFixedFootprint);
         }
     }
     if (!count->Is<RuntimeArrayCount>()) {
         if (element->HasFixedFootprint()) {
-            flags.Add(TypeFlag::kFixedFootprint);
+            flags.Add(Flag::kFixedFootprint);
         }
     }
     return flags;
diff --git a/src/tint/type/atomic.cc b/src/tint/type/atomic.cc
index 749959c..e850874 100644
--- a/src/tint/type/atomic.cc
+++ b/src/tint/type/atomic.cc
@@ -23,7 +23,7 @@
 namespace tint::type {
 
 Atomic::Atomic(const type::Type* subtype)
-    : Base(TypeFlags{
+    : Base(type::Flags{
           Flag::kCreationFixedFootprint,
           Flag::kFixedFootprint,
       }),
diff --git a/src/tint/type/bool.cc b/src/tint/type/bool.cc
index 7cde72c..a76228d 100644
--- a/src/tint/type/bool.cc
+++ b/src/tint/type/bool.cc
@@ -21,7 +21,7 @@
 namespace tint::type {
 
 Bool::Bool()
-    : Base(TypeFlags{
+    : Base(type::Flags{
           Flag::kConstructable,
           Flag::kCreationFixedFootprint,
           Flag::kFixedFootprint,
diff --git a/src/tint/type/f16.cc b/src/tint/type/f16.cc
index aecefa4..4243cb8 100644
--- a/src/tint/type/f16.cc
+++ b/src/tint/type/f16.cc
@@ -21,7 +21,7 @@
 namespace tint::type {
 
 F16::F16()
-    : Base(TypeFlags{
+    : Base(type::Flags{
           Flag::kConstructable,
           Flag::kCreationFixedFootprint,
           Flag::kFixedFootprint,
diff --git a/src/tint/type/f32.cc b/src/tint/type/f32.cc
index f9ff7ee..ea86008 100644
--- a/src/tint/type/f32.cc
+++ b/src/tint/type/f32.cc
@@ -21,7 +21,7 @@
 namespace tint::type {
 
 F32::F32()
-    : Base(TypeFlags{
+    : Base(type::Flags{
           Flag::kConstructable,
           Flag::kCreationFixedFootprint,
           Flag::kFixedFootprint,
diff --git a/src/tint/type/i32.cc b/src/tint/type/i32.cc
index 5a242e4..fb3d258 100644
--- a/src/tint/type/i32.cc
+++ b/src/tint/type/i32.cc
@@ -21,7 +21,7 @@
 namespace tint::type {
 
 I32::I32()
-    : Base(TypeFlags{
+    : Base(type::Flags{
           Flag::kConstructable,
           Flag::kCreationFixedFootprint,
           Flag::kFixedFootprint,
diff --git a/src/tint/type/matrix.cc b/src/tint/type/matrix.cc
index d73d190..063ac88 100644
--- a/src/tint/type/matrix.cc
+++ b/src/tint/type/matrix.cc
@@ -23,7 +23,7 @@
 namespace tint::type {
 
 Matrix::Matrix(const Vector* column_type, uint32_t columns)
-    : Base(TypeFlags{
+    : Base(type::Flags{
           Flag::kConstructable,
           Flag::kCreationFixedFootprint,
           Flag::kFixedFootprint,
diff --git a/src/tint/type/pointer.cc b/src/tint/type/pointer.cc
index 286e90c..c59170c 100644
--- a/src/tint/type/pointer.cc
+++ b/src/tint/type/pointer.cc
@@ -23,7 +23,7 @@
 namespace tint::type {
 
 Pointer::Pointer(const Type* subtype, ast::AddressSpace address_space, ast::Access access)
-    : Base(TypeFlags{}), subtype_(subtype), address_space_(address_space), access_(access) {
+    : Base(type::Flags{}), subtype_(subtype), address_space_(address_space), access_(access) {
     TINT_ASSERT(Type, !subtype->Is<Reference>());
     TINT_ASSERT(Type, access != ast::Access::kUndefined);
 }
diff --git a/src/tint/type/reference.cc b/src/tint/type/reference.cc
index 93cb7f2..0541f84 100644
--- a/src/tint/type/reference.cc
+++ b/src/tint/type/reference.cc
@@ -22,7 +22,7 @@
 namespace tint::type {
 
 Reference::Reference(const Type* subtype, ast::AddressSpace address_space, ast::Access access)
-    : Base(TypeFlags{}), subtype_(subtype), address_space_(address_space), access_(access) {
+    : Base(type::Flags{}), subtype_(subtype), address_space_(address_space), access_(access) {
     TINT_ASSERT(Type, !subtype->Is<Reference>());
     TINT_ASSERT(Type, access != ast::Access::kUndefined);
 }
diff --git a/src/tint/type/sampler.cc b/src/tint/type/sampler.cc
index f49d525..c49a8ef 100644
--- a/src/tint/type/sampler.cc
+++ b/src/tint/type/sampler.cc
@@ -21,7 +21,7 @@
 
 namespace tint::type {
 
-Sampler::Sampler(ast::SamplerKind kind) : Base(TypeFlags{}), kind_(kind) {}
+Sampler::Sampler(ast::SamplerKind kind) : Base(type::Flags{}), kind_(kind) {}
 
 Sampler::Sampler(Sampler&&) = default;
 
diff --git a/src/tint/type/struct.cc b/src/tint/type/struct.cc
index e7b220d..778a600 100644
--- a/src/tint/type/struct.cc
+++ b/src/tint/type/struct.cc
@@ -28,21 +28,21 @@
 namespace tint::type {
 namespace {
 
-TypeFlags FlagsFrom(utils::VectorRef<const StructMember*> members) {
-    TypeFlags flags{
-        TypeFlag::kConstructable,
-        TypeFlag::kCreationFixedFootprint,
-        TypeFlag::kFixedFootprint,
+type::Flags FlagsFrom(utils::VectorRef<const StructMember*> members) {
+    type::Flags flags{
+        Flag::kConstructable,
+        Flag::kCreationFixedFootprint,
+        Flag::kFixedFootprint,
     };
     for (auto* member : members) {
         if (!member->Type()->IsConstructible()) {
-            flags.Remove(TypeFlag::kConstructable);
+            flags.Remove(Flag::kConstructable);
         }
         if (!member->Type()->HasFixedFootprint()) {
-            flags.Remove(TypeFlag::kFixedFootprint);
+            flags.Remove(Flag::kFixedFootprint);
         }
         if (!member->Type()->HasCreationFixedFootprint()) {
-            flags.Remove(TypeFlag::kCreationFixedFootprint);
+            flags.Remove(Flag::kCreationFixedFootprint);
         }
     }
     return flags;
diff --git a/src/tint/type/texture.cc b/src/tint/type/texture.cc
index eedd273..0aa8549 100644
--- a/src/tint/type/texture.cc
+++ b/src/tint/type/texture.cc
@@ -18,7 +18,7 @@
 
 namespace tint::type {
 
-Texture::Texture(ast::TextureDimension dim) : Base(TypeFlags{}), dim_(dim) {}
+Texture::Texture(ast::TextureDimension dim) : Base(type::Flags{}), dim_(dim) {}
 
 Texture::Texture(Texture&&) = default;
 
diff --git a/src/tint/type/type.cc b/src/tint/type/type.cc
index 7241782..d7bccc0 100644
--- a/src/tint/type/type.cc
+++ b/src/tint/type/type.cc
@@ -34,7 +34,7 @@
 
 namespace tint::type {
 
-Type::Type(TypeFlags flags) : flags_(flags) {
+Type::Type(type::Flags flags) : flags_(flags) {
     if (IsConstructible()) {
         TINT_ASSERT(Type, HasCreationFixedFootprint());
     }
diff --git a/src/tint/type/type.h b/src/tint/type/type.h
index 187b566..00e1752 100644
--- a/src/tint/type/type.h
+++ b/src/tint/type/type.h
@@ -30,7 +30,7 @@
 
 namespace tint::type {
 
-enum TypeFlag {
+enum Flag {
     /// Type is constructable.
     /// @see https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
     kConstructable,
@@ -42,15 +42,12 @@
     kFixedFootprint,
 };
 
-/// An alias to utils::EnumSet<TypeFlag>
-using TypeFlags = utils::EnumSet<TypeFlag>;
+/// An alias to utils::EnumSet<Flag>
+using Flags = utils::EnumSet<Flag>;
 
 /// Base class for a type in the system
 class Type : public Castable<Type, Node> {
   public:
-    /// Alias to TypeFlag
-    using Flag = TypeFlag;
-
     /// Move constructor
     Type(Type&&);
     ~Type() override;
@@ -83,7 +80,7 @@
     virtual uint32_t Align() const;
 
     /// @returns the flags on the type
-    TypeFlags Flags() { return flags_; }
+    type::Flags Flags() { return flags_; }
 
     /// @returns true if type is constructable
     /// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
@@ -197,10 +194,10 @@
   protected:
     /// Constructor
     /// @param flags the flags of this type
-    explicit Type(TypeFlags flags);
+    explicit Type(type::Flags flags);
 
     /// The flags of this type.
-    const TypeFlags flags_;
+    const type::Flags flags_;
 };
 
 }  // namespace tint::type
diff --git a/src/tint/type/u32.cc b/src/tint/type/u32.cc
index b787c96..fd38cb9 100644
--- a/src/tint/type/u32.cc
+++ b/src/tint/type/u32.cc
@@ -21,7 +21,7 @@
 namespace tint::type {
 
 U32::U32()
-    : Base(TypeFlags{
+    : Base(type::Flags{
           Flag::kConstructable,
           Flag::kCreationFixedFootprint,
           Flag::kFixedFootprint,
diff --git a/src/tint/type/vector.cc b/src/tint/type/vector.cc
index a2b57a4..70b33bc 100644
--- a/src/tint/type/vector.cc
+++ b/src/tint/type/vector.cc
@@ -22,7 +22,7 @@
 namespace tint::type {
 
 Vector::Vector(Type const* subtype, uint32_t width)
-    : Base(TypeFlags{
+    : Base(type::Flags{
           Flag::kConstructable,
           Flag::kCreationFixedFootprint,
           Flag::kFixedFootprint,
diff --git a/src/tint/type/void.cc b/src/tint/type/void.cc
index aaeca91..b993dfe 100644
--- a/src/tint/type/void.cc
+++ b/src/tint/type/void.cc
@@ -20,7 +20,7 @@
 
 namespace tint::type {
 
-Void::Void() : Base(TypeFlags{}) {}
+Void::Void() : Base(type::Flags{}) {}
 
 Void::Void(Void&&) = default;