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>
diff --git a/src/tint/ast/access.cc b/src/tint/ast/access.cc
index cb5f864..575463d 100644
--- a/src/tint/ast/access.cc
+++ b/src/tint/ast/access.cc
@@ -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 @@
return out;
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/access.h b/src/tint/ast/access.h
index 67ad714..aa9f656 100644
--- a/src/tint/ast/access.h
+++ b/src/tint/ast/access.h
@@ -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 @@
/// @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_
diff --git a/src/tint/ast/alias.cc b/src/tint/ast/alias.cc
index d852667..1f76749 100644
--- a/src/tint/ast/alias.cc
+++ b/src/tint/ast/alias.cc
@@ -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 @@
return ctx->dst->create<Alias>(src, sym, ty);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/alias.h b/src/tint/ast/alias.h
index c21b3e2..f527d43 100644
--- a/src/tint/ast/alias.h
+++ b/src/tint/ast/alias.h
@@ -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 @@
const Type* const type;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_ALIAS_H_
diff --git a/src/tint/ast/alias_test.cc b/src/tint/ast/alias_test.cc
index db82082..6669e52 100644
--- a/src/tint/ast/alias_test.cc
+++ b/src/tint/ast/alias_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/array.cc b/src/tint/ast/array.cc
index 99b8d56..58d8a45 100644
--- a/src/tint/ast/array.cc
+++ b/src/tint/ast/array.cc
@@ -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 @@
return ctx->dst->create<Array>(src, ty, cnt, attrs);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/array.h b/src/tint/ast/array.h
index 413e4d3..05c2f4d 100644
--- a/src/tint/ast/array.h
+++ b/src/tint/ast/array.h
@@ -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 @@
const AttributeList attributes;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_ARRAY_H_
diff --git a/src/tint/ast/array_test.cc b/src/tint/ast/array_test.cc
index ff97734..e255920 100644
--- a/src/tint/ast/array_test.cc
+++ b/src/tint/ast/array_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/assignment_statement.cc b/src/tint/ast/assignment_statement.cc
index a2340b7..575e5d2 100644
--- a/src/tint/ast/assignment_statement.cc
+++ b/src/tint/ast/assignment_statement.cc
@@ -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 @@
return ctx->dst->create<AssignmentStatement>(src, l, r);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/assignment_statement.h b/src/tint/ast/assignment_statement.h
index 55e07b8..5fb8e3a 100644
--- a/src/tint/ast/assignment_statement.h
+++ b/src/tint/ast/assignment_statement.h
@@ -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 @@
const Expression* const rhs;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_ASSIGNMENT_STATEMENT_H_
diff --git a/src/tint/ast/assignment_statement_test.cc b/src/tint/ast/assignment_statement_test.cc
index 4a41a7c..39f8b83 100644
--- a/src/tint/ast/assignment_statement_test.cc
+++ b/src/tint/ast/assignment_statement_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/ast_type.cc b/src/tint/ast/ast_type.cc
index cb01679..ec247c9 100644
--- a/src/tint/ast/ast_type.cc
+++ b/src/tint/ast/ast_type.cc
@@ -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() = default;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/atomic.cc b/src/tint/ast/atomic.cc
index addefee..714dda4 100644
--- a/src/tint/ast/atomic.cc
+++ b/src/tint/ast/atomic.cc
@@ -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 @@
return ctx->dst->create<Atomic>(src, ty);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/atomic.h b/src/tint/ast/atomic.h
index d5e1b9b..734898f 100644
--- a/src/tint/ast/atomic.h
+++ b/src/tint/ast/atomic.h
@@ -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 @@
const Type* const type;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_ATOMIC_H_
diff --git a/src/tint/ast/atomic_test.cc b/src/tint/ast/atomic_test.cc
index 636654b..cd192c1 100644
--- a/src/tint/ast/atomic_test.cc
+++ b/src/tint/ast/atomic_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/attribute.cc b/src/tint/ast/attribute.cc
index 87ad3f1..90d0d77 100644
--- a/src/tint/ast/attribute.cc
+++ b/src/tint/ast/attribute.cc
@@ -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
diff --git a/src/tint/ast/attribute.h b/src/tint/ast/attribute.h
index d336727..b5c0ffcf 100644
--- a/src/tint/ast/attribute.h
+++ b/src/tint/ast/attribute.h
@@ -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 @@
return nullptr;
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_ATTRIBUTE_H_
diff --git a/src/tint/ast/binary_expression.cc b/src/tint/ast/binary_expression.cc
index 6b2be73..6d67851 100644
--- a/src/tint/ast/binary_expression.cc
+++ b/src/tint/ast/binary_expression.cc
@@ -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 @@
return ctx->dst->create<BinaryExpression>(src, op, l, r);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/binary_expression.h b/src/tint/ast/binary_expression.h
index bcacdd4..ab3f6be 100644
--- a/src/tint/ast/binary_expression.h
+++ b/src/tint/ast/binary_expression.h
@@ -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 @@
return out;
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_BINARY_EXPRESSION_H_
diff --git a/src/tint/ast/binary_expression_test.cc b/src/tint/ast/binary_expression_test.cc
index 20b8f8f..5bec07b 100644
--- a/src/tint/ast/binary_expression_test.cc
+++ b/src/tint/ast/binary_expression_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/binding_attribute.cc b/src/tint/ast/binding_attribute.cc
index bc1a74a..2fdfe20 100644
--- a/src/tint/ast/binding_attribute.cc
+++ b/src/tint/ast/binding_attribute.cc
@@ -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 @@
return ctx->dst->create<BindingAttribute>(src, value);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/binding_attribute.h b/src/tint/ast/binding_attribute.h
index 8f3214d..6ae6a0e 100644
--- a/src/tint/ast/binding_attribute.h
+++ b/src/tint/ast/binding_attribute.h
@@ -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 @@
const uint32_t value;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_BINDING_ATTRIBUTE_H_
diff --git a/src/tint/ast/binding_attribute_test.cc b/src/tint/ast/binding_attribute_test.cc
index c4c7e39..8515651 100644
--- a/src/tint/ast/binding_attribute_test.cc
+++ b/src/tint/ast/binding_attribute_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/bitcast_expression.cc b/src/tint/ast/bitcast_expression.cc
index 8de3afc..9626c47 100644
--- a/src/tint/ast/bitcast_expression.cc
+++ b/src/tint/ast/bitcast_expression.cc
@@ -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 @@
return ctx->dst->create<BitcastExpression>(src, t, e);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/bitcast_expression.h b/src/tint/ast/bitcast_expression.h
index e16ae22..11407d6 100644
--- a/src/tint/ast/bitcast_expression.h
+++ b/src/tint/ast/bitcast_expression.h
@@ -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 @@
const Expression* const expr;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_BITCAST_EXPRESSION_H_
diff --git a/src/tint/ast/bitcast_expression_test.cc b/src/tint/ast/bitcast_expression_test.cc
index 5803003..170d765 100644
--- a/src/tint/ast/bitcast_expression_test.cc
+++ b/src/tint/ast/bitcast_expression_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/block_statement.cc b/src/tint/ast/block_statement.cc
index 5a7dcba..4368e24 100644
--- a/src/tint/ast/block_statement.cc
+++ b/src/tint/ast/block_statement.cc
@@ -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 @@
return ctx->dst->create<BlockStatement>(src, stmts);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/block_statement.h b/src/tint/ast/block_statement.h
index 31b2ef1..2afce5e 100644
--- a/src/tint/ast/block_statement.h
+++ b/src/tint/ast/block_statement.h
@@ -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 @@
const StatementList statements;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_BLOCK_STATEMENT_H_
diff --git a/src/tint/ast/block_statement_test.cc b/src/tint/ast/block_statement_test.cc
index 1cc8f38..17ae585 100644
--- a/src/tint/ast/block_statement_test.cc
+++ b/src/tint/ast/block_statement_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/bool.cc b/src/tint/ast/bool.cc
index 79596a3..3f126e6 100644
--- a/src/tint/ast/bool.cc
+++ b/src/tint/ast/bool.cc
@@ -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 @@
return ctx->dst->create<Bool>(src);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/bool.h b/src/tint/ast/bool.h
index fa326da..50a4fcb 100644
--- a/src/tint/ast/bool.h
+++ b/src/tint/ast/bool.h
@@ -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 @@
const Bool* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_BOOL_H_
diff --git a/src/tint/ast/bool_literal_expression.cc b/src/tint/ast/bool_literal_expression.cc
index 5c961b4..c86036c 100644
--- a/src/tint/ast/bool_literal_expression.cc
+++ b/src/tint/ast/bool_literal_expression.cc
@@ -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 @@
return ctx->dst->create<BoolLiteralExpression>(src, value);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/bool_literal_expression.h b/src/tint/ast/bool_literal_expression.h
index 421453e..9fbd775 100644
--- a/src/tint/ast/bool_literal_expression.h
+++ b/src/tint/ast/bool_literal_expression.h
@@ -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 @@
const bool value;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_BOOL_LITERAL_EXPRESSION_H_
diff --git a/src/tint/ast/bool_literal_expression_test.cc b/src/tint/ast/bool_literal_expression_test.cc
index 78cd632..ac73802 100644
--- a/src/tint/ast/bool_literal_expression_test.cc
+++ b/src/tint/ast/bool_literal_expression_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/bool_test.cc b/src/tint/ast/bool_test.cc
index 3defbd4..665b23f 100644
--- a/src/tint/ast/bool_test.cc
+++ b/src/tint/ast/bool_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/break_statement.cc b/src/tint/ast/break_statement.cc
index 0c78c73..5748833 100644
--- a/src/tint/ast/break_statement.cc
+++ b/src/tint/ast/break_statement.cc
@@ -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 @@
return ctx->dst->create<BreakStatement>(src);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/break_statement.h b/src/tint/ast/break_statement.h
index cf50c74..bb5b00c 100644
--- a/src/tint/ast/break_statement.h
+++ b/src/tint/ast/break_statement.h
@@ -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 @@
const BreakStatement* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_BREAK_STATEMENT_H_
diff --git a/src/tint/ast/break_statement_test.cc b/src/tint/ast/break_statement_test.cc
index ce419ae..dba28cf 100644
--- a/src/tint/ast/break_statement_test.cc
+++ b/src/tint/ast/break_statement_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/builtin.cc b/src/tint/ast/builtin.cc
index 48744e0..3640411 100644
--- a/src/tint/ast/builtin.cc
+++ b/src/tint/ast/builtin.cc
@@ -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 @@
return out;
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/builtin.h b/src/tint/ast/builtin.h
index 913eba2..a0b8d5d 100644
--- a/src/tint/ast/builtin.h
+++ b/src/tint/ast/builtin.h
@@ -17,8 +17,7 @@
#include <ostream>
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// The builtin identifiers
enum class Builtin {
@@ -46,7 +45,6 @@
/// @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_
diff --git a/src/tint/ast/builtin_attribute.cc b/src/tint/ast/builtin_attribute.cc
index 0591b91..f3d013a 100644
--- a/src/tint/ast/builtin_attribute.cc
+++ b/src/tint/ast/builtin_attribute.cc
@@ -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 @@
return ctx->dst->create<BuiltinAttribute>(src, builtin);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/builtin_attribute.h b/src/tint/ast/builtin_attribute.h
index 4366739..cc562f4 100644
--- a/src/tint/ast/builtin_attribute.h
+++ b/src/tint/ast/builtin_attribute.h
@@ -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 @@
const Builtin builtin;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_BUILTIN_ATTRIBUTE_H_
diff --git a/src/tint/ast/builtin_attribute_test.cc b/src/tint/ast/builtin_attribute_test.cc
index e5a91ea..82b681d 100644
--- a/src/tint/ast/builtin_attribute_test.cc
+++ b/src/tint/ast/builtin_attribute_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/builtin_texture_helper_test.cc b/src/tint/ast/builtin_texture_helper_test.cc
index 2f80558..85567e0 100644
--- a/src/tint/ast/builtin_texture_helper_test.cc
+++ b/src/tint/ast/builtin_texture_helper_test.cc
@@ -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 @@
}
}
-} // namespace test
-} // namespace builtin
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast::builtin::test
diff --git a/src/tint/ast/builtin_texture_helper_test.h b/src/tint/ast/builtin_texture_helper_test.h
index 751f51b..ad60757 100644
--- a/src/tint/ast/builtin_texture_helper_test.h
+++ b/src/tint/ast/builtin_texture_helper_test.h
@@ -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 @@
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_
diff --git a/src/tint/ast/call_expression.cc b/src/tint/ast/call_expression.cc
index 7abf4d7..cfb6bd9 100644
--- a/src/tint/ast/call_expression.cc
+++ b/src/tint/ast/call_expression.cc
@@ -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 @@
p);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/call_expression.h b/src/tint/ast/call_expression.h
index efb1841..5c6f7ba 100644
--- a/src/tint/ast/call_expression.h
+++ b/src/tint/ast/call_expression.h
@@ -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 @@
const ExpressionList args;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_CALL_EXPRESSION_H_
diff --git a/src/tint/ast/call_expression_test.cc b/src/tint/ast/call_expression_test.cc
index a150af6..4da5048 100644
--- a/src/tint/ast/call_expression_test.cc
+++ b/src/tint/ast/call_expression_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/call_statement.cc b/src/tint/ast/call_statement.cc
index be2e97c..717b1a9 100644
--- a/src/tint/ast/call_statement.cc
+++ b/src/tint/ast/call_statement.cc
@@ -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 @@
return ctx->dst->create<CallStatement>(src, call);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/call_statement.h b/src/tint/ast/call_statement.h
index b9e0c4c..7b0677b 100644
--- a/src/tint/ast/call_statement.h
+++ b/src/tint/ast/call_statement.h
@@ -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 @@
const CallExpression* const expr;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_CALL_STATEMENT_H_
diff --git a/src/tint/ast/call_statement_test.cc b/src/tint/ast/call_statement_test.cc
index 1267a6d..1f06a99 100644
--- a/src/tint/ast/call_statement_test.cc
+++ b/src/tint/ast/call_statement_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/case_statement.cc b/src/tint/ast/case_statement.cc
index 98a2277..d4a5559 100644
--- a/src/tint/ast/case_statement.cc
+++ b/src/tint/ast/case_statement.cc
@@ -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 @@
return ctx->dst->create<CaseStatement>(src, sel, b);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/case_statement.h b/src/tint/ast/case_statement.h
index 99fd81d5..d030e70 100644
--- a/src/tint/ast/case_statement.h
+++ b/src/tint/ast/case_statement.h
@@ -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 @@
/// 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_
diff --git a/src/tint/ast/case_statement_test.cc b/src/tint/ast/case_statement_test.cc
index b716f9f..d6b217f 100644
--- a/src/tint/ast/case_statement_test.cc
+++ b/src/tint/ast/case_statement_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/compound_assignment_statement.cc b/src/tint/ast/compound_assignment_statement.cc
index cc1f07c..2df37f7 100644
--- a/src/tint/ast/compound_assignment_statement.cc
+++ b/src/tint/ast/compound_assignment_statement.cc
@@ -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 @@
return ctx->dst->create<CompoundAssignmentStatement>(src, l, r, op);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/compound_assignment_statement.h b/src/tint/ast/compound_assignment_statement.h
index 49a2004..030efea 100644
--- a/src/tint/ast/compound_assignment_statement.h
+++ b/src/tint/ast/compound_assignment_statement.h
@@ -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 @@
const BinaryOp op;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_COMPOUND_ASSIGNMENT_STATEMENT_H_
diff --git a/src/tint/ast/compound_assignment_statement_test.cc b/src/tint/ast/compound_assignment_statement_test.cc
index c84faf0..080f93e 100644
--- a/src/tint/ast/compound_assignment_statement_test.cc
+++ b/src/tint/ast/compound_assignment_statement_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/continue_statement.cc b/src/tint/ast/continue_statement.cc
index 764c912..e7d669f 100644
--- a/src/tint/ast/continue_statement.cc
+++ b/src/tint/ast/continue_statement.cc
@@ -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 @@
return ctx->dst->create<ContinueStatement>(src);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/continue_statement.h b/src/tint/ast/continue_statement.h
index ab0b12e..5761bfc 100644
--- a/src/tint/ast/continue_statement.h
+++ b/src/tint/ast/continue_statement.h
@@ -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 @@
const ContinueStatement* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_CONTINUE_STATEMENT_H_
diff --git a/src/tint/ast/continue_statement_test.cc b/src/tint/ast/continue_statement_test.cc
index 8f78852..943cdee 100644
--- a/src/tint/ast/continue_statement_test.cc
+++ b/src/tint/ast/continue_statement_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/depth_multisampled_texture.cc b/src/tint/ast/depth_multisampled_texture.cc
index bda191d..9b09864 100644
--- a/src/tint/ast/depth_multisampled_texture.cc
+++ b/src/tint/ast/depth_multisampled_texture.cc
@@ -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 @@
return ctx->dst->create<DepthMultisampledTexture>(src, dim);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/depth_multisampled_texture.h b/src/tint/ast/depth_multisampled_texture.h
index 95051a4..67f6ab0 100644
--- a/src/tint/ast/depth_multisampled_texture.h
+++ b/src/tint/ast/depth_multisampled_texture.h
@@ -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 @@
const DepthMultisampledTexture* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_DEPTH_MULTISAMPLED_TEXTURE_H_
diff --git a/src/tint/ast/depth_multisampled_texture_test.cc b/src/tint/ast/depth_multisampled_texture_test.cc
index 540a667..0ae0ada 100644
--- a/src/tint/ast/depth_multisampled_texture_test.cc
+++ b/src/tint/ast/depth_multisampled_texture_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/depth_texture.cc b/src/tint/ast/depth_texture.cc
index 5abfa76..fc1c923 100644
--- a/src/tint/ast/depth_texture.cc
+++ b/src/tint/ast/depth_texture.cc
@@ -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 @@
return ctx->dst->create<DepthTexture>(src, dim);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/depth_texture.h b/src/tint/ast/depth_texture.h
index 62cd09d..ddf4e95 100644
--- a/src/tint/ast/depth_texture.h
+++ b/src/tint/ast/depth_texture.h
@@ -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 @@
const DepthTexture* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_DEPTH_TEXTURE_H_
diff --git a/src/tint/ast/depth_texture_test.cc b/src/tint/ast/depth_texture_test.cc
index 2c4de5e..4ec2aaa 100644
--- a/src/tint/ast/depth_texture_test.cc
+++ b/src/tint/ast/depth_texture_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/disable_validation_attribute.cc b/src/tint/ast/disable_validation_attribute.cc
index e474b8e..cd009b4 100644
--- a/src/tint/ast/disable_validation_attribute.cc
+++ b/src/tint/ast/disable_validation_attribute.cc
@@ -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 @@
validation);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/disable_validation_attribute.h b/src/tint/ast/disable_validation_attribute.h
index d46edb8..5bc37ee 100644
--- a/src/tint/ast/disable_validation_attribute.h
+++ b/src/tint/ast/disable_validation_attribute.h
@@ -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 @@
const DisabledValidation validation;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_DISABLE_VALIDATION_ATTRIBUTE_H_
diff --git a/src/tint/ast/discard_statement.cc b/src/tint/ast/discard_statement.cc
index a8f9cf6..ba081ab 100644
--- a/src/tint/ast/discard_statement.cc
+++ b/src/tint/ast/discard_statement.cc
@@ -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 @@
return ctx->dst->create<DiscardStatement>(src);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/discard_statement.h b/src/tint/ast/discard_statement.h
index 7e4fcf1..c17813e 100644
--- a/src/tint/ast/discard_statement.h
+++ b/src/tint/ast/discard_statement.h
@@ -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 @@
const DiscardStatement* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_DISCARD_STATEMENT_H_
diff --git a/src/tint/ast/discard_statement_test.cc b/src/tint/ast/discard_statement_test.cc
index 08a0cc3..4101ef1 100644
--- a/src/tint/ast/discard_statement_test.cc
+++ b/src/tint/ast/discard_statement_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/else_statement.cc b/src/tint/ast/else_statement.cc
index 62908b5..d047177 100644
--- a/src/tint/ast/else_statement.cc
+++ b/src/tint/ast/else_statement.cc
@@ -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 @@
return ctx->dst->create<ElseStatement>(src, cond, b);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/else_statement.h b/src/tint/ast/else_statement.h
index 6f641c7..c8c6e51 100644
--- a/src/tint/ast/else_statement.h
+++ b/src/tint/ast/else_statement.h
@@ -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 @@
/// 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_
diff --git a/src/tint/ast/else_statement_test.cc b/src/tint/ast/else_statement_test.cc
index 27fe9ec..a088438 100644
--- a/src/tint/ast/else_statement_test.cc
+++ b/src/tint/ast/else_statement_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/expression.cc b/src/tint/ast/expression.cc
index a432326..a7f23aa 100644
--- a/src/tint/ast/expression.cc
+++ b/src/tint/ast/expression.cc
@@ -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() = default;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/expression.h b/src/tint/ast/expression.h
index 15bdacc..2338dfc 100644
--- a/src/tint/ast/expression.h
+++ b/src/tint/ast/expression.h
@@ -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 @@
/// A list of expressions
using ExpressionList = std::vector<const Expression*>;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_EXPRESSION_H_
diff --git a/src/tint/ast/external_texture.cc b/src/tint/ast/external_texture.cc
index a5a703d..01f66f1 100644
--- a/src/tint/ast/external_texture.cc
+++ b/src/tint/ast/external_texture.cc
@@ -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 @@
return ctx->dst->create<ExternalTexture>();
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/external_texture.h b/src/tint/ast/external_texture.h
index cf9f60d..614bb10 100644
--- a/src/tint/ast/external_texture.h
+++ b/src/tint/ast/external_texture.h
@@ -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 @@
const ExternalTexture* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_EXTERNAL_TEXTURE_H_
diff --git a/src/tint/ast/external_texture_test.cc b/src/tint/ast/external_texture_test.cc
index af25ac2..b4a186e 100644
--- a/src/tint/ast/external_texture_test.cc
+++ b/src/tint/ast/external_texture_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/f32.cc b/src/tint/ast/f32.cc
index 319822c..0412693 100644
--- a/src/tint/ast/f32.cc
+++ b/src/tint/ast/f32.cc
@@ -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 @@
return ctx->dst->create<F32>(src);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/f32.h b/src/tint/ast/f32.h
index 58019c9..321cf3e 100644
--- a/src/tint/ast/f32.h
+++ b/src/tint/ast/f32.h
@@ -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 @@
const F32* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_F32_H_
diff --git a/src/tint/ast/f32_test.cc b/src/tint/ast/f32_test.cc
index ec6d62e..73791e9 100644
--- a/src/tint/ast/f32_test.cc
+++ b/src/tint/ast/f32_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/fallthrough_statement.cc b/src/tint/ast/fallthrough_statement.cc
index 463d2ad..ff9b3b9 100644
--- a/src/tint/ast/fallthrough_statement.cc
+++ b/src/tint/ast/fallthrough_statement.cc
@@ -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 @@
return ctx->dst->create<FallthroughStatement>(src);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/fallthrough_statement.h b/src/tint/ast/fallthrough_statement.h
index f1cc716..262bd87 100644
--- a/src/tint/ast/fallthrough_statement.h
+++ b/src/tint/ast/fallthrough_statement.h
@@ -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 @@
const FallthroughStatement* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_FALLTHROUGH_STATEMENT_H_
diff --git a/src/tint/ast/fallthrough_statement_test.cc b/src/tint/ast/fallthrough_statement_test.cc
index 5adda3d..3069f03 100644
--- a/src/tint/ast/fallthrough_statement_test.cc
+++ b/src/tint/ast/fallthrough_statement_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/float_literal_expression.cc b/src/tint/ast/float_literal_expression.cc
index b505f67..d22cec9 100644
--- a/src/tint/ast/float_literal_expression.cc
+++ b/src/tint/ast/float_literal_expression.cc
@@ -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 @@
return ctx->dst->create<FloatLiteralExpression>(src, value);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/float_literal_expression.h b/src/tint/ast/float_literal_expression.h
index ffa3c2f..e2b0fa3 100644
--- a/src/tint/ast/float_literal_expression.h
+++ b/src/tint/ast/float_literal_expression.h
@@ -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 @@
const float value;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_FLOAT_LITERAL_EXPRESSION_H_
diff --git a/src/tint/ast/float_literal_expression_test.cc b/src/tint/ast/float_literal_expression_test.cc
index 7a91da9..dfb912d 100644
--- a/src/tint/ast/float_literal_expression_test.cc
+++ b/src/tint/ast/float_literal_expression_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/for_loop_statement.cc b/src/tint/ast/for_loop_statement.cc
index 7bb9389..0a08893 100644
--- a/src/tint/ast/for_loop_statement.cc
+++ b/src/tint/ast/for_loop_statement.cc
@@ -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 @@
return ctx->dst->create<ForLoopStatement>(src, init, cond, cont, b);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/for_loop_statement.h b/src/tint/ast/for_loop_statement.h
index 040ba52..904d327 100644
--- a/src/tint/ast/for_loop_statement.h
+++ b/src/tint/ast/for_loop_statement.h
@@ -17,8 +17,7 @@
#include "src/tint/ast/block_statement.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
class Expression;
@@ -61,7 +60,6 @@
const BlockStatement* const body;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_FOR_LOOP_STATEMENT_H_
diff --git a/src/tint/ast/for_loop_statement_test.cc b/src/tint/ast/for_loop_statement_test.cc
index 3e5e585..9c03a30 100644
--- a/src/tint/ast/for_loop_statement_test.cc
+++ b/src/tint/ast/for_loop_statement_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/function.cc b/src/tint/ast/function.cc
index cba8091..885ca51 100644
--- a/src/tint/ast/function.cc
+++ b/src/tint/ast/function.cc
@@ -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 @@
return false;
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/function.h b/src/tint/ast/function.h
index 10ad7a6..e23edf7 100644
--- a/src/tint/ast/function.h
+++ b/src/tint/ast/function.h
@@ -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 @@
bool HasStage(PipelineStage stage) const;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_FUNCTION_H_
diff --git a/src/tint/ast/function_test.cc b/src/tint/ast/function_test.cc
index d4077bd..7851ff9 100644
--- a/src/tint/ast/function_test.cc
+++ b/src/tint/ast/function_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/group_attribute.cc b/src/tint/ast/group_attribute.cc
index 58714e8..9cd82b9 100644
--- a/src/tint/ast/group_attribute.cc
+++ b/src/tint/ast/group_attribute.cc
@@ -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 @@
return ctx->dst->create<GroupAttribute>(src, value);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/group_attribute.h b/src/tint/ast/group_attribute.h
index be5c61e..de7015b 100644
--- a/src/tint/ast/group_attribute.h
+++ b/src/tint/ast/group_attribute.h
@@ -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 @@
const uint32_t value;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_GROUP_ATTRIBUTE_H_
diff --git a/src/tint/ast/group_attribute_test.cc b/src/tint/ast/group_attribute_test.cc
index fd7c18b..38cd309 100644
--- a/src/tint/ast/group_attribute_test.cc
+++ b/src/tint/ast/group_attribute_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/i32.cc b/src/tint/ast/i32.cc
index 83e4524..294699d 100644
--- a/src/tint/ast/i32.cc
+++ b/src/tint/ast/i32.cc
@@ -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 @@
return ctx->dst->create<I32>(src);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/i32.h b/src/tint/ast/i32.h
index 335bc98..62043e6 100644
--- a/src/tint/ast/i32.h
+++ b/src/tint/ast/i32.h
@@ -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 @@
const I32* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_I32_H_
diff --git a/src/tint/ast/i32_test.cc b/src/tint/ast/i32_test.cc
index 7e1c265..7a632a7 100644
--- a/src/tint/ast/i32_test.cc
+++ b/src/tint/ast/i32_test.cc
@@ -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 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/id_attribute.cc b/src/tint/ast/id_attribute.cc
index b94b450..ac5957d 100644
--- a/src/tint/ast/id_attribute.cc
+++ b/src/tint/ast/id_attribute.cc
@@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::IdAttribute);
-namespace tint {
-namespace ast {
+namespace tint::ast {
IdAttribute::IdAttribute(ProgramID pid, const Source& src, uint32_t val)
: Base(pid, src), value(val) {}
@@ -38,5 +37,4 @@
return ctx->dst->create<IdAttribute>(src, value);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/id_attribute.h b/src/tint/ast/id_attribute.h
index 7fbac0e..4789e0d 100644
--- a/src/tint/ast/id_attribute.h
+++ b/src/tint/ast/id_attribute.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// An id attribute for pipeline-overridable constants
class IdAttribute final : public Castable<IdAttribute, Attribute> {
@@ -45,7 +44,6 @@
const uint32_t value;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_ID_ATTRIBUTE_H_
diff --git a/src/tint/ast/id_attribute_test.cc b/src/tint/ast/id_attribute_test.cc
index c3c372b..af623ba 100644
--- a/src/tint/ast/id_attribute_test.cc
+++ b/src/tint/ast/id_attribute_test.cc
@@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using IdAttributeTest = TestHelper;
@@ -28,5 +27,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/identifier_expression.cc b/src/tint/ast/identifier_expression.cc
index 1f73a45..ff04f73 100644
--- a/src/tint/ast/identifier_expression.cc
+++ b/src/tint/ast/identifier_expression.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::IdentifierExpression);
-namespace tint {
-namespace ast {
+namespace tint::ast {
IdentifierExpression::IdentifierExpression(ProgramID pid,
const Source& src,
@@ -41,5 +40,4 @@
return ctx->dst->create<IdentifierExpression>(src, sym);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/identifier_expression.h b/src/tint/ast/identifier_expression.h
index 6c3c8b3..80e013e 100644
--- a/src/tint/ast/identifier_expression.h
+++ b/src/tint/ast/identifier_expression.h
@@ -17,8 +17,7 @@
#include "src/tint/ast/expression.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// An identifier expression
class IdentifierExpression final
@@ -43,7 +42,6 @@
const Symbol symbol;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_IDENTIFIER_EXPRESSION_H_
diff --git a/src/tint/ast/identifier_expression_test.cc b/src/tint/ast/identifier_expression_test.cc
index b8c3a2a..0609eb1 100644
--- a/src/tint/ast/identifier_expression_test.cc
+++ b/src/tint/ast/identifier_expression_test.cc
@@ -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 IdentifierExpressionTest = TestHelper;
@@ -60,5 +59,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/if_statement.cc b/src/tint/ast/if_statement.cc
index 276d5d2..4b78da3 100644
--- a/src/tint/ast/if_statement.cc
+++ b/src/tint/ast/if_statement.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::IfStatement);
-namespace tint {
-namespace ast {
+namespace tint::ast {
IfStatement::IfStatement(ProgramID pid,
const Source& src,
@@ -53,5 +52,4 @@
return ctx->dst->create<IfStatement>(src, cond, b, el);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/if_statement.h b/src/tint/ast/if_statement.h
index dae9fd7..df843f8 100644
--- a/src/tint/ast/if_statement.h
+++ b/src/tint/ast/if_statement.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/else_statement.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// An if statement
class IfStatement final : public Castable<IfStatement, Statement> {
@@ -56,7 +55,6 @@
const ElseStatementList else_statements;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_IF_STATEMENT_H_
diff --git a/src/tint/ast/if_statement_test.cc b/src/tint/ast/if_statement_test.cc
index 6090eca..83f998a 100644
--- a/src/tint/ast/if_statement_test.cc
+++ b/src/tint/ast/if_statement_test.cc
@@ -18,8 +18,7 @@
#include "src/tint/ast/discard_statement.h"
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using IfStatementTest = TestHelper;
@@ -102,5 +101,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/index_accessor_expression.cc b/src/tint/ast/index_accessor_expression.cc
index afd73fd..6fed4ea 100644
--- a/src/tint/ast/index_accessor_expression.cc
+++ b/src/tint/ast/index_accessor_expression.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::IndexAccessorExpression);
-namespace tint {
-namespace ast {
+namespace tint::ast {
IndexAccessorExpression::IndexAccessorExpression(ProgramID pid,
const Source& src,
@@ -46,5 +45,4 @@
return ctx->dst->create<IndexAccessorExpression>(src, obj, idx);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/index_accessor_expression.h b/src/tint/ast/index_accessor_expression.h
index 6fabada..a5e48cc 100644
--- a/src/tint/ast/index_accessor_expression.h
+++ b/src/tint/ast/index_accessor_expression.h
@@ -17,8 +17,7 @@
#include "src/tint/ast/expression.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// An index accessor expression
class IndexAccessorExpression final
@@ -50,7 +49,6 @@
const Expression* const index;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_INDEX_ACCESSOR_EXPRESSION_H_
diff --git a/src/tint/ast/index_accessor_expression_test.cc b/src/tint/ast/index_accessor_expression_test.cc
index 8b91239..45fef2b 100644
--- a/src/tint/ast/index_accessor_expression_test.cc
+++ b/src/tint/ast/index_accessor_expression_test.cc
@@ -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 IndexAccessorExpressionTest = TestHelper;
@@ -87,5 +86,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/int_literal_expression.cc b/src/tint/ast/int_literal_expression.cc
index 05c9f2d..8cd68c9 100644
--- a/src/tint/ast/int_literal_expression.cc
+++ b/src/tint/ast/int_literal_expression.cc
@@ -16,13 +16,11 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::IntLiteralExpression);
-namespace tint {
-namespace ast {
+namespace tint::ast {
IntLiteralExpression::IntLiteralExpression(ProgramID pid, const Source& src)
: Base(pid, src) {}
IntLiteralExpression::~IntLiteralExpression() = default;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/int_literal_expression.h b/src/tint/ast/int_literal_expression.h
index 9da44bb..9ca3105 100644
--- a/src/tint/ast/int_literal_expression.h
+++ b/src/tint/ast/int_literal_expression.h
@@ -17,8 +17,7 @@
#include "src/tint/ast/literal_expression.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// An integer literal. This could be either signed or unsigned.
class IntLiteralExpression
@@ -39,7 +38,6 @@
IntLiteralExpression(ProgramID pid, const Source& src);
}; // namespace ast
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_INT_LITERAL_EXPRESSION_H_
diff --git a/src/tint/ast/int_literal_expression_test.cc b/src/tint/ast/int_literal_expression_test.cc
index e64d456..d04def1 100644
--- a/src/tint/ast/int_literal_expression_test.cc
+++ b/src/tint/ast/int_literal_expression_test.cc
@@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using IntLiteralExpressionTest = TestHelper;
@@ -31,5 +30,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/internal_attribute.cc b/src/tint/ast/internal_attribute.cc
index 7f8c84be..b42af9c 100644
--- a/src/tint/ast/internal_attribute.cc
+++ b/src/tint/ast/internal_attribute.cc
@@ -16,8 +16,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::InternalAttribute);
-namespace tint {
-namespace ast {
+namespace tint::ast {
InternalAttribute::InternalAttribute(ProgramID pid) : Base(pid, Source{}) {}
@@ -27,5 +26,4 @@
return "internal";
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/internal_attribute.h b/src/tint/ast/internal_attribute.h
index 6a9fd4a..7e35dcb 100644
--- a/src/tint/ast/internal_attribute.h
+++ b/src/tint/ast/internal_attribute.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// An attribute used to indicate that a function is tint-internal.
/// These attributes are not produced by generators, but instead are usually
@@ -42,7 +41,6 @@
std::string Name() const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_INTERNAL_ATTRIBUTE_H_
diff --git a/src/tint/ast/interpolate_attribute.cc b/src/tint/ast/interpolate_attribute.cc
index 1cf62c6..6f452a9 100644
--- a/src/tint/ast/interpolate_attribute.cc
+++ b/src/tint/ast/interpolate_attribute.cc
@@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::InterpolateAttribute);
-namespace tint {
-namespace ast {
+namespace tint::ast {
InterpolateAttribute::InterpolateAttribute(ProgramID pid,
const Source& src,
@@ -82,5 +81,4 @@
return out;
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/interpolate_attribute.h b/src/tint/ast/interpolate_attribute.h
index ac3b49d..a659ef9 100644
--- a/src/tint/ast/interpolate_attribute.h
+++ b/src/tint/ast/interpolate_attribute.h
@@ -20,8 +20,7 @@
#include "src/tint/ast/attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// The interpolation type.
enum class InterpolationType { kPerspective, kLinear, kFlat };
@@ -70,7 +69,6 @@
/// @return the std::ostream so calls can be chained
std::ostream& operator<<(std::ostream& out, InterpolationSampling sampling);
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_INTERPOLATE_ATTRIBUTE_H_
diff --git a/src/tint/ast/interpolate_attribute_test.cc b/src/tint/ast/interpolate_attribute_test.cc
index e8417b2..8bf85e1 100644
--- a/src/tint/ast/interpolate_attribute_test.cc
+++ b/src/tint/ast/interpolate_attribute_test.cc
@@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using InterpolateAttributeTest = TestHelper;
@@ -30,5 +29,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/invariant_attribute.cc b/src/tint/ast/invariant_attribute.cc
index f893b8a..31dd4b7d 100644
--- a/src/tint/ast/invariant_attribute.cc
+++ b/src/tint/ast/invariant_attribute.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::InvariantAttribute);
-namespace tint {
-namespace ast {
+namespace tint::ast {
InvariantAttribute::InvariantAttribute(ProgramID pid, const Source& src)
: Base(pid, src) {}
@@ -36,5 +35,4 @@
return ctx->dst->create<InvariantAttribute>(src);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/invariant_attribute.h b/src/tint/ast/invariant_attribute.h
index 08a58e8..375eb3c 100644
--- a/src/tint/ast/invariant_attribute.h
+++ b/src/tint/ast/invariant_attribute.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// The invariant attribute
class InvariantAttribute final
@@ -42,7 +41,6 @@
const InvariantAttribute* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_INVARIANT_ATTRIBUTE_H_
diff --git a/src/tint/ast/invariant_attribute_test.cc b/src/tint/ast/invariant_attribute_test.cc
index 7b09ed6..edc7498 100644
--- a/src/tint/ast/invariant_attribute_test.cc
+++ b/src/tint/ast/invariant_attribute_test.cc
@@ -16,12 +16,10 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using InvariantAttributeTest = TestHelper;
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/literal_expression.cc b/src/tint/ast/literal_expression.cc
index 25aa908..6863357 100644
--- a/src/tint/ast/literal_expression.cc
+++ b/src/tint/ast/literal_expression.cc
@@ -16,13 +16,11 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::LiteralExpression);
-namespace tint {
-namespace ast {
+namespace tint::ast {
LiteralExpression::LiteralExpression(ProgramID pid, const Source& src)
: Base(pid, src) {}
LiteralExpression::~LiteralExpression() = default;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/literal_expression.h b/src/tint/ast/literal_expression.h
index 0b1c708..e794f59 100644
--- a/src/tint/ast/literal_expression.h
+++ b/src/tint/ast/literal_expression.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/expression.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// Base class for a literal value expressions
class LiteralExpression : public Castable<LiteralExpression, Expression> {
@@ -34,7 +33,6 @@
LiteralExpression(ProgramID pid, const Source& src);
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_LITERAL_EXPRESSION_H_
diff --git a/src/tint/ast/location_attribute.cc b/src/tint/ast/location_attribute.cc
index 9f3a53d..e6d4f68 100644
--- a/src/tint/ast/location_attribute.cc
+++ b/src/tint/ast/location_attribute.cc
@@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::LocationAttribute);
-namespace tint {
-namespace ast {
+namespace tint::ast {
LocationAttribute::LocationAttribute(ProgramID pid,
const Source& src,
@@ -40,5 +39,4 @@
return ctx->dst->create<LocationAttribute>(src, value);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/location_attribute.h b/src/tint/ast/location_attribute.h
index 3c8078d..eefd863 100644
--- a/src/tint/ast/location_attribute.h
+++ b/src/tint/ast/location_attribute.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A location attribute
class LocationAttribute final : public Castable<LocationAttribute, Attribute> {
@@ -45,7 +44,6 @@
const uint32_t value;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_LOCATION_ATTRIBUTE_H_
diff --git a/src/tint/ast/location_attribute_test.cc b/src/tint/ast/location_attribute_test.cc
index e826a1c..e71b7fb 100644
--- a/src/tint/ast/location_attribute_test.cc
+++ b/src/tint/ast/location_attribute_test.cc
@@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using LocationAttributeTest = TestHelper;
@@ -26,5 +25,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/loop_statement.cc b/src/tint/ast/loop_statement.cc
index 4e490fd..35f8d79 100644
--- a/src/tint/ast/loop_statement.cc
+++ b/src/tint/ast/loop_statement.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::LoopStatement);
-namespace tint {
-namespace ast {
+namespace tint::ast {
LoopStatement::LoopStatement(ProgramID pid,
const Source& src,
@@ -43,5 +42,4 @@
return ctx->dst->create<LoopStatement>(src, b, cont);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/loop_statement.h b/src/tint/ast/loop_statement.h
index be29fc0..921b68e 100644
--- a/src/tint/ast/loop_statement.h
+++ b/src/tint/ast/loop_statement.h
@@ -17,8 +17,7 @@
#include "src/tint/ast/block_statement.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A loop statement
class LoopStatement final : public Castable<LoopStatement, Statement> {
@@ -49,7 +48,6 @@
const BlockStatement* const continuing;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_LOOP_STATEMENT_H_
diff --git a/src/tint/ast/loop_statement_test.cc b/src/tint/ast/loop_statement_test.cc
index 17cf7e9..9c8e812 100644
--- a/src/tint/ast/loop_statement_test.cc
+++ b/src/tint/ast/loop_statement_test.cc
@@ -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 LoopStatementTest = TestHelper;
@@ -101,5 +100,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/matrix.cc b/src/tint/ast/matrix.cc
index ce65483..b9baa27 100644
--- a/src/tint/ast/matrix.cc
+++ b/src/tint/ast/matrix.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Matrix);
-namespace tint {
-namespace ast {
+namespace tint::ast {
Matrix::Matrix(ProgramID pid,
const Source& src,
@@ -52,5 +51,4 @@
return ctx->dst->create<Matrix>(src, ty, rows, columns);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/matrix.h b/src/tint/ast/matrix.h
index 0ba418c..cb1f6d9 100644
--- a/src/tint/ast/matrix.h
+++ b/src/tint/ast/matrix.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/type.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A matrix type
class Matrix final : public Castable<Matrix, Type> {
@@ -64,7 +63,6 @@
const uint32_t columns;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_MATRIX_H_
diff --git a/src/tint/ast/matrix_test.cc b/src/tint/ast/matrix_test.cc
index 9bb4b8c..54c11eb 100644
--- a/src/tint/ast/matrix_test.cc
+++ b/src/tint/ast/matrix_test.cc
@@ -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 AstMatrixTest = TestHelper;
@@ -48,5 +47,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/member_accessor_expression.cc b/src/tint/ast/member_accessor_expression.cc
index 1b5a724..71f1991 100644
--- a/src/tint/ast/member_accessor_expression.cc
+++ b/src/tint/ast/member_accessor_expression.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::MemberAccessorExpression);
-namespace tint {
-namespace ast {
+namespace tint::ast {
MemberAccessorExpression::MemberAccessorExpression(
ProgramID pid,
@@ -47,5 +46,4 @@
return ctx->dst->create<MemberAccessorExpression>(src, str, mem);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/member_accessor_expression.h b/src/tint/ast/member_accessor_expression.h
index 8a82ba1..800d018 100644
--- a/src/tint/ast/member_accessor_expression.h
+++ b/src/tint/ast/member_accessor_expression.h
@@ -17,8 +17,7 @@
#include "src/tint/ast/identifier_expression.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A member accessor expression
class MemberAccessorExpression final
@@ -50,7 +49,6 @@
const IdentifierExpression* const member;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_MEMBER_ACCESSOR_EXPRESSION_H_
diff --git a/src/tint/ast/member_accessor_expression_test.cc b/src/tint/ast/member_accessor_expression_test.cc
index 12c4e1f..ed134a0 100644
--- a/src/tint/ast/member_accessor_expression_test.cc
+++ b/src/tint/ast/member_accessor_expression_test.cc
@@ -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 MemberAccessorExpressionTest = TestHelper;
@@ -85,5 +84,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/module.cc b/src/tint/ast/module.cc
index 49634f8..8fd5cae 100644
--- a/src/tint/ast/module.cc
+++ b/src/tint/ast/module.cc
@@ -21,8 +21,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Module);
-namespace tint {
-namespace ast {
+namespace tint::ast {
Module::Module(ProgramID pid, const Source& src) : Base(pid, src) {}
@@ -123,5 +122,4 @@
}
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/module.h b/src/tint/ast/module.h
index b98013d..03e64d9 100644
--- a/src/tint/ast/module.h
+++ b/src/tint/ast/module.h
@@ -21,8 +21,7 @@
#include "src/tint/ast/function.h"
#include "src/tint/ast/type.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
class TypeDecl;
@@ -119,7 +118,6 @@
VariableList global_variables_;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_MODULE_H_
diff --git a/src/tint/ast/module_clone_test.cc b/src/tint/ast/module_clone_test.cc
index 4e92f25..3cb900b 100644
--- a/src/tint/ast/module_clone_test.cc
+++ b/src/tint/ast/module_clone_test.cc
@@ -18,8 +18,7 @@
#include "src/tint/reader/wgsl/parser.h"
#include "src/tint/writer/wgsl/generator.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
TEST(ModuleCloneTest, Clone) {
@@ -177,5 +176,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/module_test.cc b/src/tint/ast/module_test.cc
index 21b48dc..0d65509 100644
--- a/src/tint/ast/module_test.cc
+++ b/src/tint/ast/module_test.cc
@@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
#include "src/tint/clone_context.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using ModuleTest = TestHelper;
@@ -139,5 +138,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/multisampled_texture.cc b/src/tint/ast/multisampled_texture.cc
index f216a3c..fd5fc59 100644
--- a/src/tint/ast/multisampled_texture.cc
+++ b/src/tint/ast/multisampled_texture.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::MultisampledTexture);
-namespace tint {
-namespace ast {
+namespace tint::ast {
MultisampledTexture::MultisampledTexture(ProgramID pid,
const Source& src,
@@ -48,5 +47,4 @@
return ctx->dst->create<MultisampledTexture>(src, dim, ty);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/multisampled_texture.h b/src/tint/ast/multisampled_texture.h
index fbc3db0..9214124 100644
--- a/src/tint/ast/multisampled_texture.h
+++ b/src/tint/ast/multisampled_texture.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/texture.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A multisampled texture type.
class MultisampledTexture final
@@ -53,7 +52,6 @@
const Type* const type;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_MULTISAMPLED_TEXTURE_H_
diff --git a/src/tint/ast/multisampled_texture_test.cc b/src/tint/ast/multisampled_texture_test.cc
index ba7ffb5..14b3252 100644
--- a/src/tint/ast/multisampled_texture_test.cc
+++ b/src/tint/ast/multisampled_texture_test.cc
@@ -32,8 +32,7 @@
#include "src/tint/ast/u32.h"
#include "src/tint/ast/vector.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using AstMultisampledTextureTest = TestHelper;
@@ -66,5 +65,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/node.cc b/src/tint/ast/node.cc
index b90f0ef..2368791 100644
--- a/src/tint/ast/node.cc
+++ b/src/tint/ast/node.cc
@@ -16,8 +16,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Node);
-namespace tint {
-namespace ast {
+namespace tint::ast {
Node::Node(ProgramID pid, const Source& src) : program_id(pid), source(src) {}
@@ -25,5 +24,4 @@
Node::~Node() = default;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/node.h b/src/tint/ast/node.h
index 01b017b5..49a917c 100644
--- a/src/tint/ast/node.h
+++ b/src/tint/ast/node.h
@@ -19,17 +19,16 @@
#include "src/tint/clone_context.h"
-namespace tint {
-
// Forward declarations
+namespace tint {
class CloneContext;
namespace sem {
class Type;
-}
-namespace sem {
class Info;
}
+} // namespace tint
+namespace tint {
namespace ast {
/// AST base class node
diff --git a/src/tint/ast/phony_expression.cc b/src/tint/ast/phony_expression.cc
index c05fb1d..eb52063 100644
--- a/src/tint/ast/phony_expression.cc
+++ b/src/tint/ast/phony_expression.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::PhonyExpression);
-namespace tint {
-namespace ast {
+namespace tint::ast {
PhonyExpression::PhonyExpression(ProgramID pid, const Source& src)
: Base(pid, src) {}
@@ -34,5 +33,4 @@
return ctx->dst->create<PhonyExpression>(src);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/phony_expression.h b/src/tint/ast/phony_expression.h
index e021846..b6012b0 100644
--- a/src/tint/ast/phony_expression.h
+++ b/src/tint/ast/phony_expression.h
@@ -17,8 +17,7 @@
#include "src/tint/ast/expression.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// Represents the `_` of a phony assignment `_ = <expr>`
/// @see https://www.w3.org/TR/WGSL/#phony-assignment-section
@@ -39,7 +38,6 @@
const PhonyExpression* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_PHONY_EXPRESSION_H_
diff --git a/src/tint/ast/phony_expression_test.cc b/src/tint/ast/phony_expression_test.cc
index 568a2d0..f15b2ff 100644
--- a/src/tint/ast/phony_expression_test.cc
+++ b/src/tint/ast/phony_expression_test.cc
@@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using IdentifierExpressionTest = TestHelper;
@@ -38,5 +37,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/pipeline_stage.cc b/src/tint/ast/pipeline_stage.cc
index 9f5203d..fc604a1 100644
--- a/src/tint/ast/pipeline_stage.cc
+++ b/src/tint/ast/pipeline_stage.cc
@@ -14,8 +14,7 @@
#include "src/tint/ast/pipeline_stage.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
std::ostream& operator<<(std::ostream& out, PipelineStage stage) {
switch (stage) {
@@ -39,5 +38,4 @@
return out;
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/pipeline_stage.h b/src/tint/ast/pipeline_stage.h
index 37e5030..a1b9c0c 100644
--- a/src/tint/ast/pipeline_stage.h
+++ b/src/tint/ast/pipeline_stage.h
@@ -17,8 +17,7 @@
#include <ostream>
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// The pipeline stage
enum class PipelineStage { kNone = -1, kVertex, kFragment, kCompute };
@@ -28,7 +27,6 @@
/// @return the std::ostream so calls can be chained
std::ostream& operator<<(std::ostream& out, PipelineStage stage);
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_PIPELINE_STAGE_H_
diff --git a/src/tint/ast/pointer.cc b/src/tint/ast/pointer.cc
index 1db6fc0..74b1da7 100644
--- a/src/tint/ast/pointer.cc
+++ b/src/tint/ast/pointer.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Pointer);
-namespace tint {
-namespace ast {
+namespace tint::ast {
Pointer::Pointer(ProgramID pid,
const Source& src,
@@ -53,5 +52,4 @@
return ctx->dst->create<Pointer>(src, ty, storage_class, access);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/pointer.h b/src/tint/ast/pointer.h
index c73eb40..9742e78 100644
--- a/src/tint/ast/pointer.h
+++ b/src/tint/ast/pointer.h
@@ -21,8 +21,7 @@
#include "src/tint/ast/storage_class.h"
#include "src/tint/ast/type.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A pointer type.
class Pointer final : public Castable<Pointer, Type> {
@@ -62,7 +61,6 @@
ast::Access const access;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_POINTER_H_
diff --git a/src/tint/ast/pointer_test.cc b/src/tint/ast/pointer_test.cc
index ec5520c..c755e1e 100644
--- a/src/tint/ast/pointer_test.cc
+++ b/src/tint/ast/pointer_test.cc
@@ -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 AstPointerTest = TestHelper;
@@ -46,5 +45,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/return_statement.cc b/src/tint/ast/return_statement.cc
index 61b6d45..0adbecb 100644
--- a/src/tint/ast/return_statement.cc
+++ b/src/tint/ast/return_statement.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::ReturnStatement);
-namespace tint {
-namespace ast {
+namespace tint::ast {
ReturnStatement::ReturnStatement(ProgramID pid, const Source& src)
: Base(pid, src), value(nullptr) {}
@@ -42,5 +41,4 @@
return ctx->dst->create<ReturnStatement>(src, ret);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/return_statement.h b/src/tint/ast/return_statement.h
index 5a20ff4..d43874c 100644
--- a/src/tint/ast/return_statement.h
+++ b/src/tint/ast/return_statement.h
@@ -18,8 +18,7 @@
#include "src/tint/ast/expression.h"
#include "src/tint/ast/statement.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A return statement
class ReturnStatement final : public Castable<ReturnStatement, Statement> {
@@ -48,7 +47,6 @@
const Expression* const value;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_RETURN_STATEMENT_H_
diff --git a/src/tint/ast/return_statement_test.cc b/src/tint/ast/return_statement_test.cc
index 93c75a7..d17a89d 100644
--- a/src/tint/ast/return_statement_test.cc
+++ b/src/tint/ast/return_statement_test.cc
@@ -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 ReturnStatementTest = TestHelper;
@@ -64,5 +63,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/sampled_texture.cc b/src/tint/ast/sampled_texture.cc
index 7937ad5..21cb0f5 100644
--- a/src/tint/ast/sampled_texture.cc
+++ b/src/tint/ast/sampled_texture.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::SampledTexture);
-namespace tint {
-namespace ast {
+namespace tint::ast {
SampledTexture::SampledTexture(ProgramID pid,
const Source& src,
@@ -46,5 +45,4 @@
return ctx->dst->create<SampledTexture>(src, dim, ty);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/sampled_texture.h b/src/tint/ast/sampled_texture.h
index 6d0820c..d7c28f5 100644
--- a/src/tint/ast/sampled_texture.h
+++ b/src/tint/ast/sampled_texture.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/texture.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A sampled texture type.
class SampledTexture final : public Castable<SampledTexture, Texture> {
@@ -52,7 +51,6 @@
const Type* const type;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_SAMPLED_TEXTURE_H_
diff --git a/src/tint/ast/sampled_texture_test.cc b/src/tint/ast/sampled_texture_test.cc
index 033751d..d89ff96 100644
--- a/src/tint/ast/sampled_texture_test.cc
+++ b/src/tint/ast/sampled_texture_test.cc
@@ -17,8 +17,7 @@
#include "src/tint/ast/f32.h"
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using AstSampledTextureTest = TestHelper;
@@ -50,5 +49,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/sampler.cc b/src/tint/ast/sampler.cc
index 2db571d..68eddaf 100644
--- a/src/tint/ast/sampler.cc
+++ b/src/tint/ast/sampler.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Sampler);
-namespace tint {
-namespace ast {
+namespace tint::ast {
std::ostream& operator<<(std::ostream& out, SamplerKind kind) {
switch (kind) {
@@ -49,5 +48,4 @@
return ctx->dst->create<Sampler>(src, kind);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/sampler.h b/src/tint/ast/sampler.h
index 8724384..18c6fa2 100644
--- a/src/tint/ast/sampler.h
+++ b/src/tint/ast/sampler.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/type.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// The different kinds of samplers
enum class SamplerKind {
@@ -64,7 +63,6 @@
const SamplerKind kind;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_SAMPLER_H_
diff --git a/src/tint/ast/sampler_test.cc b/src/tint/ast/sampler_test.cc
index 2ae7d42..16e21290 100644
--- a/src/tint/ast/sampler_test.cc
+++ b/src/tint/ast/sampler_test.cc
@@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using AstSamplerTest = TestHelper;
@@ -44,5 +43,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/sint_literal_expression.cc b/src/tint/ast/sint_literal_expression.cc
index fc0a4b3..5a215ec 100644
--- a/src/tint/ast/sint_literal_expression.cc
+++ b/src/tint/ast/sint_literal_expression.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::SintLiteralExpression);
-namespace tint {
-namespace ast {
+namespace tint::ast {
SintLiteralExpression::SintLiteralExpression(ProgramID pid,
const Source& src,
@@ -39,5 +38,4 @@
return ctx->dst->create<SintLiteralExpression>(src, value);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/sint_literal_expression.h b/src/tint/ast/sint_literal_expression.h
index 1431dd2..74d60fc 100644
--- a/src/tint/ast/sint_literal_expression.h
+++ b/src/tint/ast/sint_literal_expression.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/int_literal_expression.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A signed int literal
class SintLiteralExpression final
@@ -46,7 +45,6 @@
const int32_t value;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_SINT_LITERAL_EXPRESSION_H_
diff --git a/src/tint/ast/sint_literal_expression_test.cc b/src/tint/ast/sint_literal_expression_test.cc
index f19fff9..79be9b2 100644
--- a/src/tint/ast/sint_literal_expression_test.cc
+++ b/src/tint/ast/sint_literal_expression_test.cc
@@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using SintLiteralExpressionTest = TestHelper;
@@ -27,5 +26,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/stage_attribute.cc b/src/tint/ast/stage_attribute.cc
index 92cc802..0b59633 100644
--- a/src/tint/ast/stage_attribute.cc
+++ b/src/tint/ast/stage_attribute.cc
@@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::StageAttribute);
-namespace tint {
-namespace ast {
+namespace tint::ast {
StageAttribute::StageAttribute(ProgramID pid,
const Source& src,
@@ -40,5 +39,4 @@
return ctx->dst->create<StageAttribute>(src, stage);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/stage_attribute.h b/src/tint/ast/stage_attribute.h
index 7bf918c..6195eaa 100644
--- a/src/tint/ast/stage_attribute.h
+++ b/src/tint/ast/stage_attribute.h
@@ -20,8 +20,7 @@
#include "src/tint/ast/attribute.h"
#include "src/tint/ast/pipeline_stage.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A workgroup attribute
class StageAttribute final : public Castable<StageAttribute, Attribute> {
@@ -48,7 +47,6 @@
const PipelineStage stage;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_STAGE_ATTRIBUTE_H_
diff --git a/src/tint/ast/stage_attribute_test.cc b/src/tint/ast/stage_attribute_test.cc
index e1cc93a..f1d8b5a 100644
--- a/src/tint/ast/stage_attribute_test.cc
+++ b/src/tint/ast/stage_attribute_test.cc
@@ -17,8 +17,7 @@
#include "src/tint/ast/test_helper.h"
#include "src/tint/ast/workgroup_attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using StageAttributeTest = TestHelper;
@@ -29,5 +28,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/statement.cc b/src/tint/ast/statement.cc
index de02bbd..0d8750d 100644
--- a/src/tint/ast/statement.cc
+++ b/src/tint/ast/statement.cc
@@ -28,8 +28,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Statement);
-namespace tint {
-namespace ast {
+namespace tint::ast {
Statement::Statement(ProgramID pid, const Source& src) : Base(pid, src) {}
@@ -83,5 +82,4 @@
return "statement";
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/statement.h b/src/tint/ast/statement.h
index e6c9a1c..931e1b5 100644
--- a/src/tint/ast/statement.h
+++ b/src/tint/ast/statement.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/node.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// Base statement class
class Statement : public Castable<Statement, Node> {
@@ -42,7 +41,6 @@
/// A list of statements
using StatementList = std::vector<const Statement*>;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_STATEMENT_H_
diff --git a/src/tint/ast/storage_class.cc b/src/tint/ast/storage_class.cc
index b760647..00d6d92 100644
--- a/src/tint/ast/storage_class.cc
+++ b/src/tint/ast/storage_class.cc
@@ -14,8 +14,7 @@
#include "src/tint/ast/storage_class.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
const char* ToString(StorageClass sc) {
switch (sc) {
@@ -47,5 +46,4 @@
return out;
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/storage_class.h b/src/tint/ast/storage_class.h
index bc22468..dc7a94a 100644
--- a/src/tint/ast/storage_class.h
+++ b/src/tint/ast/storage_class.h
@@ -17,8 +17,7 @@
#include <ostream>
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// Storage class of a given pointer.
enum class StorageClass {
@@ -50,7 +49,6 @@
/// @return the std::ostream so calls can be chained
std::ostream& operator<<(std::ostream& out, StorageClass sc);
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_STORAGE_CLASS_H_
diff --git a/src/tint/ast/storage_texture.cc b/src/tint/ast/storage_texture.cc
index 9f818ec..170b2ee 100644
--- a/src/tint/ast/storage_texture.cc
+++ b/src/tint/ast/storage_texture.cc
@@ -21,8 +21,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::StorageTexture);
-namespace tint {
-namespace ast {
+namespace tint::ast {
// Note, these names match the names in the WGSL spec. This behaviour is used
// in the WGSL writer to emit the texture format names.
@@ -142,5 +141,4 @@
return nullptr;
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/storage_texture.h b/src/tint/ast/storage_texture.h
index 9af93af..ca962c1 100644
--- a/src/tint/ast/storage_texture.h
+++ b/src/tint/ast/storage_texture.h
@@ -20,8 +20,7 @@
#include "src/tint/ast/access.h"
#include "src/tint/ast/texture.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// The texel format in the storage texture
enum class TexelFormat {
@@ -95,7 +94,6 @@
const Access access;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_STORAGE_TEXTURE_H_
diff --git a/src/tint/ast/storage_texture_test.cc b/src/tint/ast/storage_texture_test.cc
index 5186b7e..77447a8 100644
--- a/src/tint/ast/storage_texture_test.cc
+++ b/src/tint/ast/storage_texture_test.cc
@@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using AstStorageTextureTest = TestHelper;
@@ -91,5 +90,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/stride_attribute.cc b/src/tint/ast/stride_attribute.cc
index 1c763ac..3eb1f6d 100644
--- a/src/tint/ast/stride_attribute.cc
+++ b/src/tint/ast/stride_attribute.cc
@@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::StrideAttribute);
-namespace tint {
-namespace ast {
+namespace tint::ast {
StrideAttribute::StrideAttribute(ProgramID pid, const Source& src, uint32_t s)
: Base(pid, src), stride(s) {}
@@ -38,5 +37,4 @@
return ctx->dst->create<StrideAttribute>(src, stride);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/stride_attribute.h b/src/tint/ast/stride_attribute.h
index 0aa3baf..232bae7 100644
--- a/src/tint/ast/stride_attribute.h
+++ b/src/tint/ast/stride_attribute.h
@@ -20,8 +20,7 @@
#include "src/tint/ast/attribute.h"
#include "src/tint/ast/internal_attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A stride attribute used by the SPIR-V reader for strided arrays and
/// matrices.
@@ -47,7 +46,6 @@
const uint32_t stride;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_STRIDE_ATTRIBUTE_H_
diff --git a/src/tint/ast/stride_attribute_test.cc b/src/tint/ast/stride_attribute_test.cc
index f8549ec..1eba1e1 100644
--- a/src/tint/ast/stride_attribute_test.cc
+++ b/src/tint/ast/stride_attribute_test.cc
@@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using StrideAttributeTest = TestHelper;
@@ -35,5 +34,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/struct.cc b/src/tint/ast/struct.cc
index c33c07d..4f82c3a 100644
--- a/src/tint/ast/struct.cc
+++ b/src/tint/ast/struct.cc
@@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Struct);
-namespace tint {
-namespace ast {
+namespace tint::ast {
Struct::Struct(ProgramID pid,
const Source& src,
@@ -52,5 +51,4 @@
return ctx->dst->create<Struct>(src, n, mem, attrs);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/struct.h b/src/tint/ast/struct.h
index 076c46d..7e44da4 100644
--- a/src/tint/ast/struct.h
+++ b/src/tint/ast/struct.h
@@ -22,8 +22,7 @@
#include "src/tint/ast/struct_member.h"
#include "src/tint/ast/type_decl.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A struct statement.
class Struct final : public Castable<Struct, TypeDecl> {
@@ -57,7 +56,6 @@
const AttributeList attributes;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_STRUCT_H_
diff --git a/src/tint/ast/struct_member.cc b/src/tint/ast/struct_member.cc
index 2afb10d..b1cff3b 100644
--- a/src/tint/ast/struct_member.cc
+++ b/src/tint/ast/struct_member.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::StructMember);
-namespace tint {
-namespace ast {
+namespace tint::ast {
StructMember::StructMember(ProgramID pid,
const Source& src,
@@ -49,5 +48,4 @@
return ctx->dst->create<StructMember>(src, sym, ty, attrs);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/struct_member.h b/src/tint/ast/struct_member.h
index 4be9256..4d3bb02 100644
--- a/src/tint/ast/struct_member.h
+++ b/src/tint/ast/struct_member.h
@@ -20,8 +20,7 @@
#include "src/tint/ast/attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
// Forward declaration
class Type;
@@ -64,7 +63,6 @@
/// A list of struct members
using StructMemberList = std::vector<const StructMember*>;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_STRUCT_MEMBER_H_
diff --git a/src/tint/ast/struct_member_align_attribute.cc b/src/tint/ast/struct_member_align_attribute.cc
index 7790800..8736dd10 100644
--- a/src/tint/ast/struct_member_align_attribute.cc
+++ b/src/tint/ast/struct_member_align_attribute.cc
@@ -21,8 +21,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::StructMemberAlignAttribute);
-namespace tint {
-namespace ast {
+namespace tint::ast {
StructMemberAlignAttribute::StructMemberAlignAttribute(ProgramID pid,
const Source& src,
@@ -42,5 +41,4 @@
return ctx->dst->create<StructMemberAlignAttribute>(src, align);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/struct_member_align_attribute.h b/src/tint/ast/struct_member_align_attribute.h
index a1b455b..d8e629e 100644
--- a/src/tint/ast/struct_member_align_attribute.h
+++ b/src/tint/ast/struct_member_align_attribute.h
@@ -20,8 +20,7 @@
#include "src/tint/ast/attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A struct member align attribute
class StructMemberAlignAttribute final
@@ -47,7 +46,6 @@
const uint32_t align;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_STRUCT_MEMBER_ALIGN_ATTRIBUTE_H_
diff --git a/src/tint/ast/struct_member_align_attribute_test.cc b/src/tint/ast/struct_member_align_attribute_test.cc
index 9dcddd4..47b57aa 100644
--- a/src/tint/ast/struct_member_align_attribute_test.cc
+++ b/src/tint/ast/struct_member_align_attribute_test.cc
@@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using StructMemberAlignAttributeTest = TestHelper;
@@ -28,5 +27,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/struct_member_offset_attribute.cc b/src/tint/ast/struct_member_offset_attribute.cc
index a854f8c..5d9ec16 100644
--- a/src/tint/ast/struct_member_offset_attribute.cc
+++ b/src/tint/ast/struct_member_offset_attribute.cc
@@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::StructMemberOffsetAttribute);
-namespace tint {
-namespace ast {
+namespace tint::ast {
StructMemberOffsetAttribute::StructMemberOffsetAttribute(ProgramID pid,
const Source& src,
@@ -41,5 +40,4 @@
return ctx->dst->create<StructMemberOffsetAttribute>(src, offset);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/struct_member_offset_attribute.h b/src/tint/ast/struct_member_offset_attribute.h
index 63db959..b1a25e0 100644
--- a/src/tint/ast/struct_member_offset_attribute.h
+++ b/src/tint/ast/struct_member_offset_attribute.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A struct member offset attribute
/// @note The WGSL spec removed the `@offset(n)` attribute for `@size(n)`
@@ -57,7 +56,6 @@
const uint32_t offset;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_STRUCT_MEMBER_OFFSET_ATTRIBUTE_H_
diff --git a/src/tint/ast/struct_member_offset_attribute_test.cc b/src/tint/ast/struct_member_offset_attribute_test.cc
index 022821a..80399262 100644
--- a/src/tint/ast/struct_member_offset_attribute_test.cc
+++ b/src/tint/ast/struct_member_offset_attribute_test.cc
@@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using StructMemberOffsetAttributeTest = TestHelper;
@@ -26,5 +25,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/struct_member_size_attribute.cc b/src/tint/ast/struct_member_size_attribute.cc
index d76820a..5e01c7d 100644
--- a/src/tint/ast/struct_member_size_attribute.cc
+++ b/src/tint/ast/struct_member_size_attribute.cc
@@ -21,8 +21,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::StructMemberSizeAttribute);
-namespace tint {
-namespace ast {
+namespace tint::ast {
StructMemberSizeAttribute::StructMemberSizeAttribute(ProgramID pid,
const Source& src,
@@ -42,5 +41,4 @@
return ctx->dst->create<StructMemberSizeAttribute>(src, size);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/struct_member_size_attribute.h b/src/tint/ast/struct_member_size_attribute.h
index c2a6e50..967e602 100644
--- a/src/tint/ast/struct_member_size_attribute.h
+++ b/src/tint/ast/struct_member_size_attribute.h
@@ -20,8 +20,7 @@
#include "src/tint/ast/attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A struct member size attribute
class StructMemberSizeAttribute final
@@ -47,7 +46,6 @@
const uint32_t size;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_STRUCT_MEMBER_SIZE_ATTRIBUTE_H_
diff --git a/src/tint/ast/struct_member_size_attribute_test.cc b/src/tint/ast/struct_member_size_attribute_test.cc
index 346535d..8998d1d 100644
--- a/src/tint/ast/struct_member_size_attribute_test.cc
+++ b/src/tint/ast/struct_member_size_attribute_test.cc
@@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using StructMemberSizeAttributeTest = TestHelper;
@@ -28,5 +27,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/struct_member_test.cc b/src/tint/ast/struct_member_test.cc
index c675a47..9fd4d7b 100644
--- a/src/tint/ast/struct_member_test.cc
+++ b/src/tint/ast/struct_member_test.cc
@@ -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 StructMemberTest = TestHelper;
@@ -94,5 +93,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/struct_test.cc b/src/tint/ast/struct_test.cc
index 3b02767..2c629a2 100644
--- a/src/tint/ast/struct_test.cc
+++ b/src/tint/ast/struct_test.cc
@@ -28,8 +28,7 @@
#include "src/tint/ast/vector.h"
#include "src/tint/transform/add_spirv_block_attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using AstStructTest = TestHelper;
@@ -129,5 +128,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/switch_statement.cc b/src/tint/ast/switch_statement.cc
index 02cbb61..13c455a 100644
--- a/src/tint/ast/switch_statement.cc
+++ b/src/tint/ast/switch_statement.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::SwitchStatement);
-namespace tint {
-namespace ast {
+namespace tint::ast {
SwitchStatement::SwitchStatement(ProgramID pid,
const Source& src,
@@ -46,5 +45,4 @@
return ctx->dst->create<SwitchStatement>(src, cond, b);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/switch_statement.h b/src/tint/ast/switch_statement.h
index aa0cc77..34394c8 100644
--- a/src/tint/ast/switch_statement.h
+++ b/src/tint/ast/switch_statement.h
@@ -18,8 +18,7 @@
#include "src/tint/ast/case_statement.h"
#include "src/tint/ast/expression.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A switch statement
class SwitchStatement final : public Castable<SwitchStatement, Statement> {
@@ -54,7 +53,6 @@
SwitchStatement(const SwitchStatement&) = delete;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_SWITCH_STATEMENT_H_
diff --git a/src/tint/ast/switch_statement_test.cc b/src/tint/ast/switch_statement_test.cc
index ecbf68c..3b927ce 100644
--- a/src/tint/ast/switch_statement_test.cc
+++ b/src/tint/ast/switch_statement_test.cc
@@ -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 SwitchStatementTest = TestHelper;
@@ -114,5 +113,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/test_helper.h b/src/tint/ast/test_helper.h
index 2c3be98..cf9474d 100644
--- a/src/tint/ast/test_helper.h
+++ b/src/tint/ast/test_helper.h
@@ -18,8 +18,7 @@
#include "gtest/gtest.h"
#include "src/tint/program_builder.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// Helper base class for testing
template <typename BASE>
@@ -32,7 +31,6 @@
template <typename T>
using TestParamHelper = TestHelperBase<testing::TestWithParam<T>>;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_TEST_HELPER_H_
diff --git a/src/tint/ast/texture.cc b/src/tint/ast/texture.cc
index 38d16e4..d88db6e 100644
--- a/src/tint/ast/texture.cc
+++ b/src/tint/ast/texture.cc
@@ -16,8 +16,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Texture);
-namespace tint {
-namespace ast {
+namespace tint::ast {
std::ostream& operator<<(std::ostream& out, TextureDimension dim) {
switch (dim) {
@@ -85,5 +84,4 @@
Texture::~Texture() = default;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/texture.h b/src/tint/ast/texture.h
index 41e893a..716cdf0 100644
--- a/src/tint/ast/texture.h
+++ b/src/tint/ast/texture.h
@@ -17,8 +17,7 @@
#include "src/tint/ast/type.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// The dimensionality of the texture
enum class TextureDimension {
@@ -77,7 +76,6 @@
const TextureDimension dim;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_TEXTURE_H_
diff --git a/src/tint/ast/texture_test.cc b/src/tint/ast/texture_test.cc
index 017d56e..84298b8 100644
--- a/src/tint/ast/texture_test.cc
+++ b/src/tint/ast/texture_test.cc
@@ -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 AstTextureTypeTest = TestHelper;
@@ -54,5 +53,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/traverse_expressions.h b/src/tint/ast/traverse_expressions.h
index 084a201..77f27a2 100644
--- a/src/tint/ast/traverse_expressions.h
+++ b/src/tint/ast/traverse_expressions.h
@@ -27,8 +27,7 @@
#include "src/tint/ast/unary_op_expression.h"
#include "src/tint/utils/reverse.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// The action to perform after calling the TraverseExpressions() callback
/// function.
@@ -148,7 +147,6 @@
return true;
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_TRAVERSE_EXPRESSIONS_H_
diff --git a/src/tint/ast/traverse_expressions_test.cc b/src/tint/ast/traverse_expressions_test.cc
index ae839ba..cacc93f 100644
--- a/src/tint/ast/traverse_expressions_test.cc
+++ b/src/tint/ast/traverse_expressions_test.cc
@@ -16,8 +16,7 @@
#include "gmock/gmock.h"
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using ::testing::ElementsAre;
@@ -233,5 +232,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/type.h b/src/tint/ast/type.h
index 8154988..f9c8e31 100644
--- a/src/tint/ast/type.h
+++ b/src/tint/ast/type.h
@@ -20,14 +20,13 @@
#include "src/tint/ast/node.h"
#include "src/tint/clone_context.h"
-namespace tint {
-
// Forward declarations
+namespace tint {
class ProgramBuilder;
class SymbolTable;
+} // namespace tint
-namespace ast {
-
+namespace tint::ast {
/// Base class for a type in the system
class Type : public Castable<Type, Node> {
public:
@@ -47,7 +46,6 @@
Type(ProgramID pid, const Source& src);
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_TYPE_H_
diff --git a/src/tint/ast/type_decl.cc b/src/tint/ast/type_decl.cc
index 6d0b301..04c221c 100644
--- a/src/tint/ast/type_decl.cc
+++ b/src/tint/ast/type_decl.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::TypeDecl);
-namespace tint {
-namespace ast {
+namespace tint::ast {
TypeDecl::TypeDecl(ProgramID pid, const Source& src, Symbol n)
: Base(pid, src), name(n) {
@@ -30,5 +29,4 @@
TypeDecl::~TypeDecl() = default;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/type_decl.h b/src/tint/ast/type_decl.h
index 0e290cd..de3bd0a 100644
--- a/src/tint/ast/type_decl.h
+++ b/src/tint/ast/type_decl.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/type.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// The base class for type declarations.
class TypeDecl : public Castable<TypeDecl, Node> {
@@ -39,7 +38,6 @@
const Symbol name;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_TYPE_DECL_H_
diff --git a/src/tint/ast/type_name.cc b/src/tint/ast/type_name.cc
index 1f58b9e..8e84a55 100644
--- a/src/tint/ast/type_name.cc
+++ b/src/tint/ast/type_name.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::TypeName);
-namespace tint {
-namespace ast {
+namespace tint::ast {
TypeName::TypeName(ProgramID pid, const Source& src, Symbol n)
: Base(pid, src), name(n) {}
@@ -38,5 +37,4 @@
return ctx->dst->create<TypeName>(src, n);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/type_name.h b/src/tint/ast/type_name.h
index 9bae5d0..bd3968a 100644
--- a/src/tint/ast/type_name.h
+++ b/src/tint/ast/type_name.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/type.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A named type (i.e. struct or alias)
class TypeName final : public Castable<TypeName, Type> {
@@ -49,7 +48,6 @@
Symbol name;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_TYPE_NAME_H_
diff --git a/src/tint/ast/u32.cc b/src/tint/ast/u32.cc
index 892289a..6cabe5b 100644
--- a/src/tint/ast/u32.cc
+++ b/src/tint/ast/u32.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::U32);
-namespace tint {
-namespace ast {
+namespace tint::ast {
U32::U32(ProgramID pid, const Source& src) : Base(pid, src) {}
@@ -36,5 +35,4 @@
return ctx->dst->create<U32>(src);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/u32.h b/src/tint/ast/u32.h
index a31222b..ede477b 100644
--- a/src/tint/ast/u32.h
+++ b/src/tint/ast/u32.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/type.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A unsigned int 32 type.
class U32 final : public Castable<U32, Type> {
@@ -44,7 +43,6 @@
const U32* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_U32_H_
diff --git a/src/tint/ast/u32_test.cc b/src/tint/ast/u32_test.cc
index 9e8e5a6..30a8840 100644
--- a/src/tint/ast/u32_test.cc
+++ b/src/tint/ast/u32_test.cc
@@ -16,8 +16,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using AstU32Test = TestHelper;
@@ -28,5 +27,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/uint_literal_expression.cc b/src/tint/ast/uint_literal_expression.cc
index d53e3eb..7af3325 100644
--- a/src/tint/ast/uint_literal_expression.cc
+++ b/src/tint/ast/uint_literal_expression.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::UintLiteralExpression);
-namespace tint {
-namespace ast {
+namespace tint::ast {
UintLiteralExpression::UintLiteralExpression(ProgramID pid,
const Source& src,
@@ -39,5 +38,4 @@
return ctx->dst->create<UintLiteralExpression>(src, value);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/uint_literal_expression.h b/src/tint/ast/uint_literal_expression.h
index 58fdb96..35ef5fa 100644
--- a/src/tint/ast/uint_literal_expression.h
+++ b/src/tint/ast/uint_literal_expression.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/int_literal_expression.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A uint literal
class UintLiteralExpression final
@@ -46,7 +45,6 @@
const uint32_t value;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_UINT_LITERAL_EXPRESSION_H_
diff --git a/src/tint/ast/uint_literal_expression_test.cc b/src/tint/ast/uint_literal_expression_test.cc
index 1732dde..f37816f 100644
--- a/src/tint/ast/uint_literal_expression_test.cc
+++ b/src/tint/ast/uint_literal_expression_test.cc
@@ -14,8 +14,7 @@
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using UintLiteralExpressionTest = TestHelper;
@@ -27,5 +26,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/unary_op.cc b/src/tint/ast/unary_op.cc
index 4b363f5..b90c71d 100644
--- a/src/tint/ast/unary_op.cc
+++ b/src/tint/ast/unary_op.cc
@@ -14,8 +14,7 @@
#include "src/tint/ast/unary_op.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
std::ostream& operator<<(std::ostream& out, UnaryOp mod) {
switch (mod) {
@@ -43,5 +42,4 @@
return out;
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/unary_op.h b/src/tint/ast/unary_op.h
index 33fdbbf..93b6722 100644
--- a/src/tint/ast/unary_op.h
+++ b/src/tint/ast/unary_op.h
@@ -17,8 +17,7 @@
#include <ostream>
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// The unary op
enum class UnaryOp {
@@ -34,7 +33,6 @@
/// @return the std::ostream so calls can be chained
std::ostream& operator<<(std::ostream& out, UnaryOp mod);
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_UNARY_OP_H_
diff --git a/src/tint/ast/unary_op_expression.cc b/src/tint/ast/unary_op_expression.cc
index 032fa02..7636a54 100644
--- a/src/tint/ast/unary_op_expression.cc
+++ b/src/tint/ast/unary_op_expression.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::UnaryOpExpression);
-namespace tint {
-namespace ast {
+namespace tint::ast {
UnaryOpExpression::UnaryOpExpression(ProgramID pid,
const Source& src,
@@ -41,5 +40,4 @@
return ctx->dst->create<UnaryOpExpression>(src, op, e);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/unary_op_expression.h b/src/tint/ast/unary_op_expression.h
index 9b19a77..1164108 100644
--- a/src/tint/ast/unary_op_expression.h
+++ b/src/tint/ast/unary_op_expression.h
@@ -18,8 +18,7 @@
#include "src/tint/ast/expression.h"
#include "src/tint/ast/unary_op.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A unary op expression
class UnaryOpExpression final : public Castable<UnaryOpExpression, Expression> {
@@ -50,7 +49,6 @@
const Expression* const expr;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_UNARY_OP_EXPRESSION_H_
diff --git a/src/tint/ast/unary_op_expression_test.cc b/src/tint/ast/unary_op_expression_test.cc
index 3f1b1cf..5baf5da 100644
--- a/src/tint/ast/unary_op_expression_test.cc
+++ b/src/tint/ast/unary_op_expression_test.cc
@@ -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 UnaryOpExpressionTest = TestHelper;
@@ -66,5 +65,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/variable.cc b/src/tint/ast/variable.cc
index 62d8dd9..cea9f84 100644
--- a/src/tint/ast/variable.cc
+++ b/src/tint/ast/variable.cc
@@ -19,8 +19,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Variable);
-namespace tint {
-namespace ast {
+namespace tint::ast {
Variable::Variable(ProgramID pid,
const Source& src,
@@ -75,5 +74,4 @@
is_overridable, ctor, attrs);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/variable.h b/src/tint/ast/variable.h
index 88b6ad2..27a5564 100644
--- a/src/tint/ast/variable.h
+++ b/src/tint/ast/variable.h
@@ -23,8 +23,7 @@
#include "src/tint/ast/expression.h"
#include "src/tint/ast/storage_class.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
// Forward declarations
class BindingAttribute;
@@ -180,7 +179,6 @@
/// A list of variables
using VariableList = std::vector<const Variable*>;
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_VARIABLE_H_
diff --git a/src/tint/ast/variable_decl_statement.cc b/src/tint/ast/variable_decl_statement.cc
index 6adf183..16d1106 100644
--- a/src/tint/ast/variable_decl_statement.cc
+++ b/src/tint/ast/variable_decl_statement.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::VariableDeclStatement);
-namespace tint {
-namespace ast {
+namespace tint::ast {
VariableDeclStatement::VariableDeclStatement(ProgramID pid,
const Source& src,
@@ -41,5 +40,4 @@
return ctx->dst->create<VariableDeclStatement>(src, var);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/variable_decl_statement.h b/src/tint/ast/variable_decl_statement.h
index 47fb8ab..2edee63 100644
--- a/src/tint/ast/variable_decl_statement.h
+++ b/src/tint/ast/variable_decl_statement.h
@@ -18,8 +18,7 @@
#include "src/tint/ast/statement.h"
#include "src/tint/ast/variable.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A variable declaration statement
class VariableDeclStatement final
@@ -46,7 +45,6 @@
const Variable* const variable;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_VARIABLE_DECL_STATEMENT_H_
diff --git a/src/tint/ast/variable_decl_statement_test.cc b/src/tint/ast/variable_decl_statement_test.cc
index 9881c66..e628d96 100644
--- a/src/tint/ast/variable_decl_statement_test.cc
+++ b/src/tint/ast/variable_decl_statement_test.cc
@@ -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 VariableDeclStatementTest = TestHelper;
@@ -68,5 +67,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/variable_test.cc b/src/tint/ast/variable_test.cc
index b053c0fa..334bcb3 100644
--- a/src/tint/ast/variable_test.cc
+++ b/src/tint/ast/variable_test.cc
@@ -17,8 +17,7 @@
#include "src/tint/ast/id_attribute.h"
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using VariableTest = TestHelper;
@@ -152,5 +151,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/vector.cc b/src/tint/ast/vector.cc
index d63a61b..d47aad3 100644
--- a/src/tint/ast/vector.cc
+++ b/src/tint/ast/vector.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Vector);
-namespace tint {
-namespace ast {
+namespace tint::ast {
Vector::Vector(ProgramID pid,
Source const& src,
@@ -51,5 +50,4 @@
return ctx->dst->create<Vector>(src, ty, width);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/vector.h b/src/tint/ast/vector.h
index bfc4908..dfa2ac2 100644
--- a/src/tint/ast/vector.h
+++ b/src/tint/ast/vector.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/type.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A vector type.
class Vector final : public Castable<Vector, Type> {
@@ -56,7 +55,6 @@
const uint32_t width;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_VECTOR_H_
diff --git a/src/tint/ast/vector_test.cc b/src/tint/ast/vector_test.cc
index a029e73..19c7c4e 100644
--- a/src/tint/ast/vector_test.cc
+++ b/src/tint/ast/vector_test.cc
@@ -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 AstVectorTest = TestHelper;
@@ -37,5 +36,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/void.cc b/src/tint/ast/void.cc
index 1abb83c..34314ae 100644
--- a/src/tint/ast/void.cc
+++ b/src/tint/ast/void.cc
@@ -18,8 +18,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::Void);
-namespace tint {
-namespace ast {
+namespace tint::ast {
Void::Void(ProgramID pid, const Source& src) : Base(pid, src) {}
@@ -36,5 +35,4 @@
return ctx->dst->create<Void>(src);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/void.h b/src/tint/ast/void.h
index 94d382f..55ddb35 100644
--- a/src/tint/ast/void.h
+++ b/src/tint/ast/void.h
@@ -19,8 +19,7 @@
#include "src/tint/ast/type.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
/// A void type
class Void final : public Castable<Void, Type> {
@@ -44,7 +43,6 @@
const Void* Clone(CloneContext* ctx) const override;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_VOID_H_
diff --git a/src/tint/ast/workgroup_attribute.cc b/src/tint/ast/workgroup_attribute.cc
index 7ff6954..1f7a112 100644
--- a/src/tint/ast/workgroup_attribute.cc
+++ b/src/tint/ast/workgroup_attribute.cc
@@ -20,8 +20,7 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::WorkgroupAttribute);
-namespace tint {
-namespace ast {
+namespace tint::ast {
WorkgroupAttribute::WorkgroupAttribute(ProgramID pid,
const Source& src,
@@ -45,5 +44,4 @@
return ctx->dst->create<WorkgroupAttribute>(src, x_, y_, z_);
}
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
diff --git a/src/tint/ast/workgroup_attribute.h b/src/tint/ast/workgroup_attribute.h
index 5ffc7c6..116c731 100644
--- a/src/tint/ast/workgroup_attribute.h
+++ b/src/tint/ast/workgroup_attribute.h
@@ -20,8 +20,7 @@
#include "src/tint/ast/attribute.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
// Forward declaration
class Expression;
@@ -64,7 +63,6 @@
const ast::Expression* const z = nullptr;
};
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast
#endif // SRC_TINT_AST_WORKGROUP_ATTRIBUTE_H_
diff --git a/src/tint/ast/workgroup_attribute_test.cc b/src/tint/ast/workgroup_attribute_test.cc
index ecf7186..928b5fe 100644
--- a/src/tint/ast/workgroup_attribute_test.cc
+++ b/src/tint/ast/workgroup_attribute_test.cc
@@ -17,8 +17,7 @@
#include "src/tint/ast/stage_attribute.h"
#include "src/tint/ast/test_helper.h"
-namespace tint {
-namespace ast {
+namespace tint::ast {
namespace {
using WorkgroupAttributeTest = TestHelper;
@@ -76,5 +75,4 @@
}
} // namespace
-} // namespace ast
-} // namespace tint
+} // namespace tint::ast