Condense namespaces in tint/ast.

This PR condenses the namespaces in the tint/ast folder.

Change-Id: I77a84fb03f921b4db7135572005a08563f2fb60b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86038
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair 2022-04-07 18:39:35 +00:00 committed by Dawn LUCI CQ
parent 9f49ac5493
commit 34323ac069
233 changed files with 469 additions and 942 deletions

View File

@ -14,8 +14,7 @@
#include "src/tint/ast/access.h"
namespace tint {
namespace ast {
namespace tint::ast {
std::ostream& operator<<(std::ostream& out, Access access) {
switch (access) {
@ -39,5 +38,4 @@ std::ostream& operator<<(std::ostream& out, Access access) {
return out;
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
#include <ostream>
#include <string>
namespace tint {
namespace ast {
namespace tint::ast {
/// The access control settings
enum Access {
@ -40,7 +39,6 @@ enum Access {
/// @return the std::ostream so calls can be chained
std::ostream& operator<<(std::ostream& out, Access access);
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_ACCESS_H_

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Alias);
namespace tint {
namespace ast {
namespace tint::ast {
Alias::Alias(ProgramID pid,
const Source& src,
@ -41,5 +40,4 @@ const Alias* Alias::Clone(CloneContext* ctx) const {
return ctx->dst->create<Alias>(src, sym, ty);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/type_decl.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A type alias type. Holds a name and pointer to another type.
class Alias final : public Castable<Alias, TypeDecl> {
@ -48,7 +47,6 @@ class Alias final : public Castable<Alias, TypeDecl> {
const Type* const type;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_ALIAS_H_

View File

@ -27,8 +27,7 @@
#include "src/tint/ast/u32.h"
#include "src/tint/ast/vector.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using AstAliasTest = TestHelper;
@ -41,5 +40,4 @@ TEST_F(AstAliasTest, Create) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Array);
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
// Returns the string representation of an array size expression.
@ -74,5 +73,4 @@ const Array* Array::Clone(CloneContext* ctx) const {
return ctx->dst->create<Array>(src, ty, cnt, attrs);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -20,8 +20,7 @@
#include "src/tint/ast/attribute.h"
#include "src/tint/ast/type.h"
namespace tint {
namespace ast {
namespace tint::ast {
// Forward declarations.
class Expression;
@ -69,7 +68,6 @@ class Array final : public Castable<Array, Type> {
const AttributeList attributes;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_ARRAY_H_

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using AstArrayTest = TestHelper;
@ -67,5 +66,4 @@ TEST_F(AstArrayTest, FriendlyName_WithStride) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::AssignmentStatement);
namespace tint {
namespace ast {
namespace tint::ast {
AssignmentStatement::AssignmentStatement(ProgramID pid,
const Source& src,
@ -44,5 +43,4 @@ const AssignmentStatement* AssignmentStatement::Clone(CloneContext* ctx) const {
return ctx->dst->create<AssignmentStatement>(src, l, r);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
#include "src/tint/ast/expression.h"
#include "src/tint/ast/statement.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// An assignment statement
class AssignmentStatement final
@ -51,7 +50,6 @@ class AssignmentStatement final
const Expression* const rhs;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_ASSIGNMENT_STATEMENT_H_

View File

@ -17,8 +17,7 @@
#include "gtest/gtest-spi.h"
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using AssignmentStatementTest = TestHelper;
@ -90,5 +89,4 @@ TEST_F(AssignmentStatementTest, Assert_DifferentProgramID_RHS) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -28,8 +28,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Type);
namespace tint {
namespace ast {
namespace tint::ast {
Type::Type(ProgramID pid, const Source& src) : Base(pid, src) {}
@ -37,5 +36,4 @@ Type::Type(Type&&) = default;
Type::~Type() = default;
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Atomic);
namespace tint {
namespace ast {
namespace tint::ast {
Atomic::Atomic(ProgramID pid, const Source& src, const Type* const subtype)
: Base(pid, src), type(subtype) {}
@ -41,5 +40,4 @@ const Atomic* Atomic::Clone(CloneContext* ctx) const {
return ctx->dst->create<Atomic>(src, ty);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/type.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// An atomic type.
class Atomic final : public Castable<Atomic, Type> {
@ -48,7 +47,6 @@ class Atomic final : public Castable<Atomic, Type> {
const Type* const type;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_ATOMIC_H_

View File

@ -17,8 +17,7 @@
#include "src/tint/ast/i32.h"
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using AstAtomicTest = TestHelper;
@ -36,5 +35,4 @@ TEST_F(AstAtomicTest, FriendlyName) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -16,10 +16,8 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Attribute);
namespace tint {
namespace ast {
namespace tint::ast {
Attribute::~Attribute() = default;
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -20,8 +20,7 @@
#include "src/tint/ast/node.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// The base class for all attributes
class Attribute : public Castable<Attribute, Node> {
@ -65,7 +64,6 @@ const T* GetAttribute(const AttributeList& attributes) {
return nullptr;
}
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_ATTRIBUTE_H_

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::BinaryExpression);
namespace tint {
namespace ast {
namespace tint::ast {
BinaryExpression::BinaryExpression(ProgramID pid,
const Source& src,
@ -46,5 +45,4 @@ const BinaryExpression* BinaryExpression::Clone(CloneContext* ctx) const {
return ctx->dst->create<BinaryExpression>(src, op, l, r);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -17,8 +17,7 @@
#include "src/tint/ast/expression.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// The operator type
enum class BinaryOp {
@ -258,7 +257,6 @@ inline std::ostream& operator<<(std::ostream& out, BinaryOp op) {
return out;
}
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_BINARY_EXPRESSION_H_

View File

@ -15,8 +15,7 @@
#include "gtest/gtest-spi.h"
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using BinaryExpressionTest = TestHelper;
@ -91,5 +90,4 @@ TEST_F(BinaryExpressionTest, Assert_DifferentProgramID_RHS) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::BindingAttribute);
namespace tint {
namespace ast {
namespace tint::ast {
BindingAttribute::BindingAttribute(ProgramID pid,
const Source& src,
@ -40,5 +39,4 @@ const BindingAttribute* BindingAttribute::Clone(CloneContext* ctx) const {
return ctx->dst->create<BindingAttribute>(src, value);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/attribute.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A binding attribute
class BindingAttribute final : public Castable<BindingAttribute, Attribute> {
@ -45,7 +44,6 @@ class BindingAttribute final : public Castable<BindingAttribute, Attribute> {
const uint32_t value;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_BINDING_ATTRIBUTE_H_

View File

@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using BindingAttributeTest = TestHelper;
@ -26,5 +25,4 @@ TEST_F(BindingAttributeTest, Creation) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::BitcastExpression);
namespace tint {
namespace ast {
namespace tint::ast {
BitcastExpression::BitcastExpression(ProgramID pid,
const Source& src,
@ -42,5 +41,4 @@ const BitcastExpression* BitcastExpression::Clone(CloneContext* ctx) const {
return ctx->dst->create<BitcastExpression>(src, t, e);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -17,8 +17,7 @@
#include "src/tint/ast/expression.h"
namespace tint {
namespace ast {
namespace tint::ast {
// Forward declaration
class Type;
@ -51,7 +50,6 @@ class BitcastExpression final : public Castable<BitcastExpression, Expression> {
const Expression* const expr;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_BITCAST_EXPRESSION_H_

View File

@ -17,8 +17,7 @@
#include "gtest/gtest-spi.h"
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using BitcastExpressionTest = TestHelper;
@ -77,5 +76,4 @@ TEST_F(BitcastExpressionTest, Assert_DifferentProgramID_Expr) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::BlockStatement);
namespace tint {
namespace ast {
namespace tint::ast {
BlockStatement::BlockStatement(ProgramID pid,
const Source& src,
@ -42,5 +41,4 @@ const BlockStatement* BlockStatement::Clone(CloneContext* ctx) const {
return ctx->dst->create<BlockStatement>(src, stmts);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/statement.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A block statement
class BlockStatement final : public Castable<BlockStatement, Statement> {
@ -54,7 +53,6 @@ class BlockStatement final : public Castable<BlockStatement, Statement> {
const StatementList statements;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_BLOCK_STATEMENT_H_

View File

@ -17,8 +17,7 @@
#include "src/tint/ast/if_statement.h"
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using BlockStatementTest = TestHelper;
@ -67,5 +66,4 @@ TEST_F(BlockStatementTest, Assert_DifferentProgramID_Statement) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Bool);
namespace tint {
namespace ast {
namespace tint::ast {
Bool::Bool(ProgramID pid, const Source& src) : Base(pid, src) {}
@ -36,5 +35,4 @@ const Bool* Bool::Clone(CloneContext* ctx) const {
return ctx->dst->create<Bool>(src);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -25,8 +25,7 @@
#undef Bool
#endif
namespace tint {
namespace ast {
namespace tint::ast {
/// A boolean type
class Bool final : public Castable<Bool, Type> {
@ -50,7 +49,6 @@ class Bool final : public Castable<Bool, Type> {
const Bool* Clone(CloneContext* ctx) const override;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_BOOL_H_

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::BoolLiteralExpression);
namespace tint {
namespace ast {
namespace tint::ast {
BoolLiteralExpression::BoolLiteralExpression(ProgramID pid,
const Source& src,
@ -35,5 +34,4 @@ const BoolLiteralExpression* BoolLiteralExpression::Clone(
return ctx->dst->create<BoolLiteralExpression>(src, value);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/literal_expression.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A boolean literal
class BoolLiteralExpression final
@ -43,7 +42,6 @@ class BoolLiteralExpression final
const bool value;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_BOOL_LITERAL_EXPRESSION_H_

View File

@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using BoolLiteralExpressionTest = TestHelper;
@ -33,5 +32,4 @@ TEST_F(BoolLiteralExpressionTest, False) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using AstBoolTest = TestHelper;
@ -28,5 +27,4 @@ TEST_F(AstBoolTest, FriendlyName) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::BreakStatement);
namespace tint {
namespace ast {
namespace tint::ast {
BreakStatement::BreakStatement(ProgramID pid, const Source& src)
: Base(pid, src) {}
@ -34,5 +33,4 @@ const BreakStatement* BreakStatement::Clone(CloneContext* ctx) const {
return ctx->dst->create<BreakStatement>(src);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -17,8 +17,7 @@
#include "src/tint/ast/statement.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// An break statement
class BreakStatement final : public Castable<BreakStatement, Statement> {
@ -38,7 +37,6 @@ class BreakStatement final : public Castable<BreakStatement, Statement> {
const BreakStatement* Clone(CloneContext* ctx) const override;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_BREAK_STATEMENT_H_

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using BreakStatementTest = TestHelper;
@ -35,5 +34,4 @@ TEST_F(BreakStatementTest, IsBreak) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -14,8 +14,7 @@
#include "src/tint/ast/builtin.h"
namespace tint {
namespace ast {
namespace tint::ast {
std::ostream& operator<<(std::ostream& out, Builtin builtin) {
switch (builtin) {
@ -78,5 +77,4 @@ std::ostream& operator<<(std::ostream& out, Builtin builtin) {
return out;
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -17,8 +17,7 @@
#include <ostream>
namespace tint {
namespace ast {
namespace tint::ast {
/// The builtin identifiers
enum class Builtin {
@ -46,7 +45,6 @@ enum class Builtin {
/// @return the std::ostream so calls can be chained
std::ostream& operator<<(std::ostream& out, Builtin builtin);
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_BUILTIN_H_

View File

@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::BuiltinAttribute);
namespace tint {
namespace ast {
namespace tint::ast {
BuiltinAttribute::BuiltinAttribute(ProgramID pid, const Source& src, Builtin b)
: Base(pid, src), builtin(b) {}
@ -38,5 +37,4 @@ const BuiltinAttribute* BuiltinAttribute::Clone(CloneContext* ctx) const {
return ctx->dst->create<BuiltinAttribute>(src, builtin);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -20,8 +20,7 @@
#include "src/tint/ast/attribute.h"
#include "src/tint/ast/builtin.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A builtin attribute
class BuiltinAttribute final : public Castable<BuiltinAttribute, Attribute> {
@ -46,7 +45,6 @@ class BuiltinAttribute final : public Castable<BuiltinAttribute, Attribute> {
const Builtin builtin;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_BUILTIN_ATTRIBUTE_H_

View File

@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using BuiltinAttributeTest = TestHelper;
@ -26,5 +25,4 @@ TEST_F(BuiltinAttributeTest, Creation) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,10 +18,7 @@
#include "src/tint/sem/multisampled_texture_type.h"
#include "src/tint/sem/sampled_texture_type.h"
namespace tint {
namespace ast {
namespace builtin {
namespace test {
namespace tint::ast::builtin::test {
using u32 = ProgramBuilder::u32;
using i32 = ProgramBuilder::i32;
@ -2280,7 +2277,4 @@ bool ReturnsVoid(ValidTextureOverload texture_overload) {
}
}
} // namespace test
} // namespace builtin
} // namespace ast
} // namespace tint
} // namespace tint::ast::builtin::test

View File

@ -21,10 +21,7 @@
#include "src/tint/program_builder.h"
#include "src/tint/sem/storage_texture_type.h"
namespace tint {
namespace ast {
namespace builtin {
namespace test {
namespace tint::ast::builtin::test {
enum class TextureKind {
kRegular,
@ -261,9 +258,6 @@ struct TextureOverloadCase {
std::ostream& operator<<(std::ostream& out, const TextureOverloadCase& data);
} // namespace test
} // namespace builtin
} // namespace ast
} // namespace tint
} // namespace tint::ast::builtin::test
#endif // SRC_TINT_AST_BUILTIN_TEXTURE_HELPER_TEST_H_

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::CallExpression);
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
CallExpression::Target ToTarget(const IdentifierExpression* name) {
@ -74,5 +73,4 @@ const CallExpression* CallExpression::Clone(CloneContext* ctx) const {
p);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -17,8 +17,7 @@
#include "src/tint/ast/expression.h"
namespace tint {
namespace ast {
namespace tint::ast {
// Forward declarations.
class Type;
@ -78,7 +77,6 @@ class CallExpression final : public Castable<CallExpression, Expression> {
const ExpressionList args;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_CALL_EXPRESSION_H_

View File

@ -15,8 +15,7 @@
#include "gtest/gtest-spi.h"
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using CallExpressionTest = TestHelper;
@ -145,5 +144,4 @@ TEST_F(CallExpressionTest, Assert_DifferentProgramID_Param) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::CallStatement);
namespace tint {
namespace ast {
namespace tint::ast {
CallStatement::CallStatement(ProgramID pid,
const Source& src,
@ -40,5 +39,4 @@ const CallStatement* CallStatement::Clone(CloneContext* ctx) const {
return ctx->dst->create<CallStatement>(src, call);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
#include "src/tint/ast/call_expression.h"
#include "src/tint/ast/statement.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A call expression
class CallStatement final : public Castable<CallStatement, Statement> {
@ -43,7 +42,6 @@ class CallStatement final : public Castable<CallStatement, Statement> {
const CallExpression* const expr;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_CALL_STATEMENT_H_

View File

@ -17,8 +17,7 @@
#include "gtest/gtest-spi.h"
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using CallStatementTest = TestHelper;
@ -56,5 +55,4 @@ TEST_F(CallStatementTest, Assert_DifferentProgramID_Call) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::CaseStatement);
namespace tint {
namespace ast {
namespace tint::ast {
CaseStatement::CaseStatement(ProgramID pid,
const Source& src,
@ -46,5 +45,4 @@ const CaseStatement* CaseStatement::Clone(CloneContext* ctx) const {
return ctx->dst->create<CaseStatement>(src, sel, b);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -20,8 +20,7 @@
#include "src/tint/ast/block_statement.h"
#include "src/tint/ast/int_literal_expression.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A list of case literals
using CaseSelectorList = std::vector<const IntLiteralExpression*>;
@ -61,7 +60,6 @@ class CaseStatement final : public Castable<CaseStatement, Statement> {
/// A list of case statements
using CaseStatementList = std::vector<const CaseStatement*>;
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_CASE_STATEMENT_H_

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/if_statement.h"
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using CaseStatementTest = TestHelper;
@ -133,5 +132,4 @@ TEST_F(CaseStatementTest, Assert_DifferentProgramID_Selector) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::CompoundAssignmentStatement);
namespace tint {
namespace ast {
namespace tint::ast {
CompoundAssignmentStatement::CompoundAssignmentStatement(ProgramID pid,
const Source& src,
@ -47,5 +46,4 @@ const CompoundAssignmentStatement* CompoundAssignmentStatement::Clone(
return ctx->dst->create<CompoundAssignmentStatement>(src, l, r, op);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/expression.h"
#include "src/tint/ast/statement.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A compound assignment statement
class CompoundAssignmentStatement final
@ -57,7 +56,6 @@ class CompoundAssignmentStatement final
const BinaryOp op;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_COMPOUND_ASSIGNMENT_STATEMENT_H_

View File

@ -17,8 +17,7 @@
#include "gtest/gtest-spi.h"
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using CompoundAssignmentStatementTest = TestHelper;
@ -98,5 +97,4 @@ TEST_F(CompoundAssignmentStatementTest, Assert_DifferentProgramID_RHS) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::ContinueStatement);
namespace tint {
namespace ast {
namespace tint::ast {
ContinueStatement::ContinueStatement(ProgramID pid, const Source& src)
: Base(pid, src) {}
@ -34,5 +33,4 @@ const ContinueStatement* ContinueStatement::Clone(CloneContext* ctx) const {
return ctx->dst->create<ContinueStatement>(src);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -17,8 +17,7 @@
#include "src/tint/ast/statement.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// An continue statement
class ContinueStatement final : public Castable<ContinueStatement, Statement> {
@ -38,7 +37,6 @@ class ContinueStatement final : public Castable<ContinueStatement, Statement> {
const ContinueStatement* Clone(CloneContext* ctx) const override;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_CONTINUE_STATEMENT_H_

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using ContinueStatementTest = TestHelper;
@ -35,5 +34,4 @@ TEST_F(ContinueStatementTest, IsContinue) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::DepthMultisampledTexture);
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
bool IsValidDepthDimension(TextureDimension dim) {
@ -52,5 +51,4 @@ const DepthMultisampledTexture* DepthMultisampledTexture::Clone(
return ctx->dst->create<DepthMultisampledTexture>(src, dim);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/texture.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A multisampled depth texture type.
class DepthMultisampledTexture final
@ -48,7 +47,6 @@ class DepthMultisampledTexture final
const DepthMultisampledTexture* Clone(CloneContext* ctx) const override;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_DEPTH_MULTISAMPLED_TEXTURE_H_

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using AstDepthMultisampledTextureTest = TestHelper;
@ -33,5 +32,4 @@ TEST_F(AstDepthMultisampledTextureTest, FriendlyName) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::DepthTexture);
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
bool IsValidDepthDimension(TextureDimension dim) {
@ -49,5 +48,4 @@ const DepthTexture* DepthTexture::Clone(CloneContext* ctx) const {
return ctx->dst->create<DepthTexture>(src, dim);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/texture.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A depth texture type.
class DepthTexture final : public Castable<DepthTexture, Texture> {
@ -45,7 +44,6 @@ class DepthTexture final : public Castable<DepthTexture, Texture> {
const DepthTexture* Clone(CloneContext* ctx) const override;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_DEPTH_TEXTURE_H_

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using AstDepthTextureTest = TestHelper;
@ -40,5 +39,4 @@ TEST_F(AstDepthTextureTest, FriendlyName) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::DisableValidationAttribute);
namespace tint {
namespace ast {
namespace tint::ast {
DisableValidationAttribute::DisableValidationAttribute(ProgramID pid,
DisabledValidation val)
@ -53,5 +52,4 @@ const DisableValidationAttribute* DisableValidationAttribute::Clone(
validation);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/internal_attribute.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// Enumerator of validation features that can be disabled with a
/// DisableValidationAttribute attribute.
@ -77,7 +76,6 @@ class DisableValidationAttribute final
const DisabledValidation validation;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_DISABLE_VALIDATION_ATTRIBUTE_H_

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::DiscardStatement);
namespace tint {
namespace ast {
namespace tint::ast {
DiscardStatement::DiscardStatement(ProgramID pid, const Source& src)
: Base(pid, src) {}
@ -34,5 +33,4 @@ const DiscardStatement* DiscardStatement::Clone(CloneContext* ctx) const {
return ctx->dst->create<DiscardStatement>(src);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -17,8 +17,7 @@
#include "src/tint/ast/statement.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A discard statement
class DiscardStatement final : public Castable<DiscardStatement, Statement> {
@ -38,7 +37,6 @@ class DiscardStatement final : public Castable<DiscardStatement, Statement> {
const DiscardStatement* Clone(CloneContext* ctx) const override;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_DISCARD_STATEMENT_H_

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using DiscardStatementTest = TestHelper;
@ -45,5 +44,4 @@ TEST_F(DiscardStatementTest, IsDiscard) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::ElseStatement);
namespace tint {
namespace ast {
namespace tint::ast {
ElseStatement::ElseStatement(ProgramID pid,
const Source& src,
@ -43,5 +42,4 @@ const ElseStatement* ElseStatement::Clone(CloneContext* ctx) const {
return ctx->dst->create<ElseStatement>(src, cond, b);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -20,8 +20,7 @@
#include "src/tint/ast/block_statement.h"
#include "src/tint/ast/expression.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// An else statement
class ElseStatement final : public Castable<ElseStatement, Statement> {
@ -55,7 +54,6 @@ class ElseStatement final : public Castable<ElseStatement, Statement> {
/// A list of else statements
using ElseStatementList = std::vector<const ElseStatement*>;
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_ELSE_STATEMENT_H_

View File

@ -17,8 +17,7 @@
#include "src/tint/ast/if_statement.h"
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using ElseStatementTest = TestHelper;
@ -90,5 +89,4 @@ TEST_F(ElseStatementTest, Assert_DifferentProgramID_Body) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Expression);
namespace tint {
namespace ast {
namespace tint::ast {
Expression::Expression(ProgramID pid, const Source& src) : Base(pid, src) {}
@ -28,5 +27,4 @@ Expression::Expression(Expression&&) = default;
Expression::~Expression() = default;
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -21,8 +21,7 @@
#include "src/tint/ast/node.h"
#include "src/tint/sem/type.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// Base expression class
class Expression : public Castable<Expression, Node> {
@ -41,7 +40,6 @@ class Expression : public Castable<Expression, Node> {
/// A list of expressions
using ExpressionList = std::vector<const Expression*>;
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_EXPRESSION_H_

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::ExternalTexture);
namespace tint {
namespace ast {
namespace tint::ast {
// ExternalTexture::ExternalTexture() : Base(ast::TextureDimension::k2d) {}
ExternalTexture::ExternalTexture(ProgramID pid, const Source& src)
@ -37,5 +36,4 @@ const ExternalTexture* ExternalTexture::Clone(CloneContext* ctx) const {
return ctx->dst->create<ExternalTexture>();
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/texture.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// An external texture type
class ExternalTexture final : public Castable<ExternalTexture, Texture> {
@ -45,7 +44,6 @@ class ExternalTexture final : public Castable<ExternalTexture, Texture> {
const ExternalTexture* Clone(CloneContext* ctx) const override;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_EXTERNAL_TEXTURE_H_

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using AstExternalTextureTest = TestHelper;
@ -42,5 +41,4 @@ TEST_F(AstExternalTextureTest, FriendlyName) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::F32);
namespace tint {
namespace ast {
namespace tint::ast {
F32::F32(ProgramID pid, const Source& src) : Base(pid, src) {}
@ -36,5 +35,4 @@ const F32* F32::Clone(CloneContext* ctx) const {
return ctx->dst->create<F32>(src);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/type.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A float 32 type
class F32 final : public Castable<F32, Type> {
@ -44,7 +43,6 @@ class F32 final : public Castable<F32, Type> {
const F32* Clone(CloneContext* ctx) const override;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_F32_H_

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using AstF32Test = TestHelper;
@ -28,5 +27,4 @@ TEST_F(AstF32Test, FriendlyName) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::FallthroughStatement);
namespace tint {
namespace ast {
namespace tint::ast {
FallthroughStatement::FallthroughStatement(ProgramID pid, const Source& src)
: Base(pid, src) {}
@ -35,5 +34,4 @@ const FallthroughStatement* FallthroughStatement::Clone(
return ctx->dst->create<FallthroughStatement>(src);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -17,8 +17,7 @@
#include "src/tint/ast/statement.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// An fallthrough statement
class FallthroughStatement final
@ -39,7 +38,6 @@ class FallthroughStatement final
const FallthroughStatement* Clone(CloneContext* ctx) const override;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_FALLTHROUGH_STATEMENT_H_

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using FallthroughStatementTest = TestHelper;
@ -43,5 +42,4 @@ TEST_F(FallthroughStatementTest, IsFallthrough) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::FloatLiteralExpression);
namespace tint {
namespace ast {
namespace tint::ast {
FloatLiteralExpression::FloatLiteralExpression(ProgramID pid,
const Source& src,
@ -37,5 +36,4 @@ const FloatLiteralExpression* FloatLiteralExpression::Clone(
return ctx->dst->create<FloatLiteralExpression>(src, value);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/literal_expression.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A float literal
class FloatLiteralExpression final
@ -43,7 +42,6 @@ class FloatLiteralExpression final
const float value;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_FLOAT_LITERAL_EXPRESSION_H_

View File

@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using FloatLiteralExpressionTest = TestHelper;
@ -27,5 +26,4 @@ TEST_F(FloatLiteralExpressionTest, Value) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::ForLoopStatement);
namespace tint {
namespace ast {
namespace tint::ast {
ForLoopStatement::ForLoopStatement(ProgramID pid,
const Source& src,
@ -55,5 +54,4 @@ const ForLoopStatement* ForLoopStatement::Clone(CloneContext* ctx) const {
return ctx->dst->create<ForLoopStatement>(src, init, cond, cont, b);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -17,8 +17,7 @@
#include "src/tint/ast/block_statement.h"
namespace tint {
namespace ast {
namespace tint::ast {
class Expression;
@ -61,7 +60,6 @@ class ForLoopStatement final : public Castable<ForLoopStatement, Statement> {
const BlockStatement* const body;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_FOR_LOOP_STATEMENT_H_

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/binary_expression.h"
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using ForLoopStatementTest = TestHelper;
@ -100,5 +99,4 @@ TEST_F(ForLoopStatementTest, Assert_DifferentProgramID_Body) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Function);
namespace tint {
namespace ast {
namespace tint::ast {
Function::Function(ProgramID pid,
const Source& src,
@ -104,5 +103,4 @@ bool FunctionList::HasStage(ast::PipelineStage stage) const {
return false;
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -29,8 +29,7 @@
#include "src/tint/ast/pipeline_stage.h"
#include "src/tint/ast/variable.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A Function statement.
class Function final : public Castable<Function, Node> {
@ -112,7 +111,6 @@ class FunctionList : public std::vector<const Function*> {
bool HasStage(PipelineStage stage) const;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_FUNCTION_H_

View File

@ -18,8 +18,7 @@
#include "src/tint/ast/test_helper.h"
#include "src/tint/ast/workgroup_attribute.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using FunctionTest = TestHelper;
@ -192,5 +191,4 @@ TEST_F(FunctionListTest, HasStage) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::GroupAttribute);
namespace tint {
namespace ast {
namespace tint::ast {
GroupAttribute::GroupAttribute(ProgramID pid, const Source& src, uint32_t val)
: Base(pid, src), value(val) {}
@ -38,5 +37,4 @@ const GroupAttribute* GroupAttribute::Clone(CloneContext* ctx) const {
return ctx->dst->create<GroupAttribute>(src, value);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/attribute.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A group attribute
class GroupAttribute final : public Castable<GroupAttribute, Attribute> {
@ -45,7 +44,6 @@ class GroupAttribute final : public Castable<GroupAttribute, Attribute> {
const uint32_t value;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_GROUP_ATTRIBUTE_H_

View File

@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using GroupAttributeTest = TestHelper;
@ -26,5 +25,4 @@ TEST_F(GroupAttributeTest, Creation) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::I32);
namespace tint {
namespace ast {
namespace tint::ast {
I32::I32(ProgramID pid, const Source& src) : Base(pid, src) {}
@ -36,5 +35,4 @@ const I32* I32::Clone(CloneContext* ctx) const {
return ctx->dst->create<I32>(src);
}
} // namespace ast
} // namespace tint
} // namespace tint::ast

View File

@ -19,8 +19,7 @@
#include "src/tint/ast/type.h"
namespace tint {
namespace ast {
namespace tint::ast {
/// A signed int 32 type.
class I32 final : public Castable<I32, Type> {
@ -44,7 +43,6 @@ class I32 final : public Castable<I32, Type> {
const I32* Clone(CloneContext* ctx) const override;
};
} // namespace ast
} // namespace tint
} // namespace tint::ast
#endif // SRC_TINT_AST_I32_H_

View File

@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
namespace tint {
namespace ast {
namespace tint::ast {
namespace {
using AstI32Test = TestHelper;
@ -28,5 +27,4 @@ TEST_F(AstI32Test, FriendlyName) {
}
} // namespace
} // namespace ast
} // namespace tint
} // namespace tint::ast

Some files were not shown because too many files have changed in this diff Show More