diff --git a/src/tint/writer/glsl/generator.cc b/src/tint/writer/glsl/generator.cc index 9ae88adc1b..ad06ac4e90 100644 --- a/src/tint/writer/glsl/generator.cc +++ b/src/tint/writer/glsl/generator.cc @@ -19,9 +19,7 @@ #include "src/tint/transform/glsl.h" #include "src/tint/writer/glsl/generator_impl.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { Options::Options() = default; Options::~Options() = default; @@ -71,6 +69,4 @@ Result Generate(const Program* program, return result; } -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator.h b/src/tint/writer/glsl/generator.h index 88be42993b..19c3d8d99a 100644 --- a/src/tint/writer/glsl/generator.h +++ b/src/tint/writer/glsl/generator.h @@ -28,16 +28,15 @@ #include "src/tint/writer/glsl/version.h" #include "src/tint/writer/text.h" +// Forward declarations namespace tint { - -// Forward declarations class Program; - -namespace writer { -namespace glsl { - -// Forward declarations +namespace writer::glsl { class GeneratorImpl; +} // namespace writer::glsl +} // namespace tint + +namespace tint::writer::glsl { using BindingMap = std::unordered_map; @@ -112,8 +111,6 @@ Result Generate(const Program* program, const Options& options, const std::string& entry_point); -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl #endif // SRC_TINT_WRITER_GLSL_GENERATOR_H_ diff --git a/src/tint/writer/glsl/generator_impl.cc b/src/tint/writer/glsl/generator_impl.cc index 05fd7613b3..729a8c07b4 100644 --- a/src/tint/writer/glsl/generator_impl.cc +++ b/src/tint/writer/glsl/generator_impl.cc @@ -75,9 +75,7 @@ bool RequiresOESSampleVariables(tint::ast::Builtin builtin) { } // namespace -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { const char kTempNamePrefix[] = "tint_tmp"; @@ -2890,6 +2888,4 @@ sem::Type* GeneratorImpl::BoolTypeToUint(const sem::Type* type) { } } -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl.h b/src/tint/writer/glsl/generator_impl.h index b158391083..37be658229 100644 --- a/src/tint/writer/glsl/generator_impl.h +++ b/src/tint/writer/glsl/generator_impl.h @@ -38,18 +38,15 @@ #include "src/tint/writer/glsl/version.h" #include "src/tint/writer/text_generator.h" -namespace tint { - // Forward declarations -namespace sem { +namespace tint::sem { class Call; class Builtin; class TypeConstructor; class TypeConversion; -} // namespace sem +} // namespace tint::sem -namespace writer { -namespace glsl { +namespace tint::writer::glsl { /// Implementation class for GLSL generator class GeneratorImpl : public TextGenerator { @@ -500,8 +497,6 @@ class GeneratorImpl : public TextGenerator { Version version_; }; -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl #endif // SRC_TINT_WRITER_GLSL_GENERATOR_IMPL_H_ diff --git a/src/tint/writer/glsl/generator_impl_array_accessor_test.cc b/src/tint/writer/glsl/generator_impl_array_accessor_test.cc index 484685c7bf..7858f9bd9e 100644 --- a/src/tint/writer/glsl/generator_impl_array_accessor_test.cc +++ b/src/tint/writer/glsl/generator_impl_array_accessor_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Expression = TestHelper; @@ -34,6 +32,4 @@ TEST_F(GlslGeneratorImplTest_Expression, IndexAccessor) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_assign_test.cc b/src/tint/writer/glsl/generator_impl_assign_test.cc index 2b55ceb540..c0da89ee96 100644 --- a/src/tint/writer/glsl/generator_impl_assign_test.cc +++ b/src/tint/writer/glsl/generator_impl_assign_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Assign = TestHelper; @@ -36,6 +34,4 @@ TEST_F(GlslGeneratorImplTest_Assign, Emit_Assign) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_binary_test.cc b/src/tint/writer/glsl/generator_impl_binary_test.cc index ad11beb17f..744eef48af 100644 --- a/src/tint/writer/glsl/generator_impl_binary_test.cc +++ b/src/tint/writer/glsl/generator_impl_binary_test.cc @@ -16,9 +16,7 @@ #include "src/tint/ast/variable_decl_statement.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Binary = TestHelper; @@ -541,6 +539,4 @@ foo((tint_tmp), (tint_tmp_1), (tint_tmp_2)); } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_bitcast_test.cc b/src/tint/writer/glsl/generator_impl_bitcast_test.cc index 15667302ed..c0fcfb4a34 100644 --- a/src/tint/writer/glsl/generator_impl_bitcast_test.cc +++ b/src/tint/writer/glsl/generator_impl_bitcast_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Bitcast = TestHelper; @@ -55,6 +53,4 @@ TEST_F(GlslGeneratorImplTest_Bitcast, EmitExpression_Bitcast_Uint) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_block_test.cc b/src/tint/writer/glsl/generator_impl_block_test.cc index 8a9a504e86..cdfc9259f4 100644 --- a/src/tint/writer/glsl/generator_impl_block_test.cc +++ b/src/tint/writer/glsl/generator_impl_block_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Block = TestHelper; @@ -37,6 +35,4 @@ TEST_F(GlslGeneratorImplTest_Block, Emit_Block) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_break_test.cc b/src/tint/writer/glsl/generator_impl_break_test.cc index 32a2a6554f..7e716a23a0 100644 --- a/src/tint/writer/glsl/generator_impl_break_test.cc +++ b/src/tint/writer/glsl/generator_impl_break_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Break = TestHelper; @@ -34,6 +32,4 @@ TEST_F(GlslGeneratorImplTest_Break, Emit_Break) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_builtin_test.cc b/src/tint/writer/glsl/generator_impl_builtin_test.cc index 9fdce03524..3b313263f2 100644 --- a/src/tint/writer/glsl/generator_impl_builtin_test.cc +++ b/src/tint/writer/glsl/generator_impl_builtin_test.cc @@ -18,9 +18,7 @@ #include "src/tint/sem/call.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using BuiltinType = sem::BuiltinType; @@ -877,6 +875,4 @@ void main() { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_builtin_texture_test.cc b/src/tint/writer/glsl/generator_impl_builtin_texture_test.cc index 78d7267458..a94eb67f76 100644 --- a/src/tint/writer/glsl/generator_impl_builtin_texture_test.cc +++ b/src/tint/writer/glsl/generator_impl_builtin_texture_test.cc @@ -18,9 +18,7 @@ #include "src/tint/ast/stage_attribute.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using ::testing::HasSubstr; @@ -299,6 +297,4 @@ INSTANTIATE_TEST_SUITE_P( testing::ValuesIn(ast::builtin::test::TextureOverloadCase::ValidCases())); } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_call_test.cc b/src/tint/writer/glsl/generator_impl_call_test.cc index bf1fefaa54..fc74bb9c0a 100644 --- a/src/tint/writer/glsl/generator_impl_call_test.cc +++ b/src/tint/writer/glsl/generator_impl_call_test.cc @@ -15,9 +15,7 @@ #include "src/tint/ast/call_statement.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Call = TestHelper; @@ -76,6 +74,4 @@ TEST_F(GlslGeneratorImplTest_Call, EmitStatement_Call) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_case_test.cc b/src/tint/writer/glsl/generator_impl_case_test.cc index 9814ff053f..ecf39371b3 100644 --- a/src/tint/writer/glsl/generator_impl_case_test.cc +++ b/src/tint/writer/glsl/generator_impl_case_test.cc @@ -15,9 +15,7 @@ #include "src/tint/ast/fallthrough_statement.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Case = TestHelper; @@ -103,6 +101,4 @@ TEST_F(GlslGeneratorImplTest_Case, Emit_Case_Default) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_cast_test.cc b/src/tint/writer/glsl/generator_impl_cast_test.cc index 21fb8ba706..8228af6855 100644 --- a/src/tint/writer/glsl/generator_impl_cast_test.cc +++ b/src/tint/writer/glsl/generator_impl_cast_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Cast = TestHelper; @@ -44,6 +42,4 @@ TEST_F(GlslGeneratorImplTest_Cast, EmitExpression_Cast_Vector) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_constructor_test.cc b/src/tint/writer/glsl/generator_impl_constructor_test.cc index ff90549968..51f29434d7 100644 --- a/src/tint/writer/glsl/generator_impl_constructor_test.cc +++ b/src/tint/writer/glsl/generator_impl_constructor_test.cc @@ -15,9 +15,7 @@ #include "gmock/gmock.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using ::testing::HasSubstr; @@ -235,6 +233,4 @@ TEST_F(GlslGeneratorImplTest_Constructor, EmitConstructor_Type_Struct_Empty) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_continue_test.cc b/src/tint/writer/glsl/generator_impl_continue_test.cc index 675b408b3c..961aec5c71 100644 --- a/src/tint/writer/glsl/generator_impl_continue_test.cc +++ b/src/tint/writer/glsl/generator_impl_continue_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Continue = TestHelper; @@ -41,6 +39,4 @@ TEST_F(GlslGeneratorImplTest_Continue, Emit_Continue) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_discard_test.cc b/src/tint/writer/glsl/generator_impl_discard_test.cc index f218c9e0bd..7f3f183905 100644 --- a/src/tint/writer/glsl/generator_impl_discard_test.cc +++ b/src/tint/writer/glsl/generator_impl_discard_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Discard = TestHelper; @@ -34,6 +32,4 @@ TEST_F(GlslGeneratorImplTest_Discard, Emit_Discard) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_function_test.cc b/src/tint/writer/glsl/generator_impl_function_test.cc index 6a42143a1d..c9aa3b9ef0 100644 --- a/src/tint/writer/glsl/generator_impl_function_test.cc +++ b/src/tint/writer/glsl/generator_impl_function_test.cc @@ -20,9 +20,7 @@ using ::testing::HasSubstr; -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Function = TestHelper; @@ -984,6 +982,4 @@ void main_1() { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_identifier_test.cc b/src/tint/writer/glsl/generator_impl_identifier_test.cc index cf86f6501c..18369cbc72 100644 --- a/src/tint/writer/glsl/generator_impl_identifier_test.cc +++ b/src/tint/writer/glsl/generator_impl_identifier_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Identifier = TestHelper; @@ -35,6 +33,4 @@ TEST_F(GlslGeneratorImplTest_Identifier, EmitIdentifierExpression) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_if_test.cc b/src/tint/writer/glsl/generator_impl_if_test.cc index e44a2bcb76..69759433b8 100644 --- a/src/tint/writer/glsl/generator_impl_if_test.cc +++ b/src/tint/writer/glsl/generator_impl_if_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_If = TestHelper; @@ -130,6 +128,4 @@ TEST_F(GlslGeneratorImplTest_If, Emit_IfWithMultiple) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_import_test.cc b/src/tint/writer/glsl/generator_impl_import_test.cc index 54f9a77b28..b2cdf55176 100644 --- a/src/tint/writer/glsl/generator_impl_import_test.cc +++ b/src/tint/writer/glsl/generator_impl_import_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Import = TestHelper; @@ -276,6 +274,4 @@ TEST_F(GlslGeneratorImplTest_Import, GlslImportData_Determinant) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_loop_test.cc b/src/tint/writer/glsl/generator_impl_loop_test.cc index bbe8749580..a8fa039232 100644 --- a/src/tint/writer/glsl/generator_impl_loop_test.cc +++ b/src/tint/writer/glsl/generator_impl_loop_test.cc @@ -15,9 +15,7 @@ #include "src/tint/ast/variable_decl_statement.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Loop = TestHelper; @@ -385,6 +383,4 @@ TEST_F(GlslGeneratorImplTest_Loop, Emit_ForLoopWithMultiStmtInitCondCont) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_member_accessor_test.cc b/src/tint/writer/glsl/generator_impl_member_accessor_test.cc index e297050c35..f46779864f 100644 --- a/src/tint/writer/glsl/generator_impl_member_accessor_test.cc +++ b/src/tint/writer/glsl/generator_impl_member_accessor_test.cc @@ -16,9 +16,7 @@ #include "src/tint/ast/stage_attribute.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using ::testing::HasSubstr; @@ -879,6 +877,4 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor, Swizzle_gbr) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_module_constant_test.cc b/src/tint/writer/glsl/generator_impl_module_constant_test.cc index a636041167..bf9c74c714 100644 --- a/src/tint/writer/glsl/generator_impl_module_constant_test.cc +++ b/src/tint/writer/glsl/generator_impl_module_constant_test.cc @@ -15,9 +15,7 @@ #include "src/tint/ast/id_attribute.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_ModuleConstant = TestHelper; @@ -87,6 +85,4 @@ const float b = WGSL_SPEC_CONSTANT_1; } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_return_test.cc b/src/tint/writer/glsl/generator_impl_return_test.cc index 414f0e1308..760188a9f8 100644 --- a/src/tint/writer/glsl/generator_impl_return_test.cc +++ b/src/tint/writer/glsl/generator_impl_return_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Return = TestHelper; @@ -46,6 +44,4 @@ TEST_F(GlslGeneratorImplTest_Return, Emit_ReturnWithValue) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_sanitizer_test.cc b/src/tint/writer/glsl/generator_impl_sanitizer_test.cc index 6447d2c11b..812806f8f4 100644 --- a/src/tint/writer/glsl/generator_impl_sanitizer_test.cc +++ b/src/tint/writer/glsl/generator_impl_sanitizer_test.cc @@ -17,9 +17,7 @@ #include "src/tint/ast/variable_decl_statement.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslSanitizerTest = TestHelper; @@ -328,6 +326,4 @@ void main() { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_storage_buffer_test.cc b/src/tint/writer/glsl/generator_impl_storage_buffer_test.cc index be4e7c8d43..00bca6c523 100644 --- a/src/tint/writer/glsl/generator_impl_storage_buffer_test.cc +++ b/src/tint/writer/glsl/generator_impl_storage_buffer_test.cc @@ -17,9 +17,7 @@ using ::testing::HasSubstr; -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_StorageBuffer = TestHelper; @@ -92,6 +90,4 @@ layout(binding = 0, std430) buffer Nephews_1 { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_switch_test.cc b/src/tint/writer/glsl/generator_impl_switch_test.cc index f18587144a..e49c08ce06 100644 --- a/src/tint/writer/glsl/generator_impl_switch_test.cc +++ b/src/tint/writer/glsl/generator_impl_switch_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_Switch = TestHelper; @@ -59,6 +57,4 @@ TEST_F(GlslGeneratorImplTest_Switch, Emit_Switch) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_test.cc b/src/tint/writer/glsl/generator_impl_test.cc index fe5acb02bb..cecfa92677 100644 --- a/src/tint/writer/glsl/generator_impl_test.cc +++ b/src/tint/writer/glsl/generator_impl_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest = TestHelper; @@ -95,6 +93,4 @@ int my_func() { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_type_test.cc b/src/tint/writer/glsl/generator_impl_type_test.cc index c6d7e86e74..c6dbf539f8 100644 --- a/src/tint/writer/glsl/generator_impl_type_test.cc +++ b/src/tint/writer/glsl/generator_impl_type_test.cc @@ -22,9 +22,7 @@ #include "src/tint/sem/storage_texture_type.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using ::testing::HasSubstr; @@ -537,6 +535,4 @@ INSTANTIATE_TEST_SUITE_P( ast::TexelFormat::kRgba32Sint, "image1D tex;"})); } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_unary_op_test.cc b/src/tint/writer/glsl/generator_impl_unary_op_test.cc index 5f84322857..2743ad18d1 100644 --- a/src/tint/writer/glsl/generator_impl_unary_op_test.cc +++ b/src/tint/writer/glsl/generator_impl_unary_op_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslUnaryOpTest = TestHelper; @@ -88,6 +86,4 @@ TEST_F(GlslUnaryOpTest, Negation) { EXPECT_EQ(out.str(), "-(expr)"); } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_uniform_buffer_test.cc b/src/tint/writer/glsl/generator_impl_uniform_buffer_test.cc index 32e484ef11..b7a5f88814 100644 --- a/src/tint/writer/glsl/generator_impl_uniform_buffer_test.cc +++ b/src/tint/writer/glsl/generator_impl_uniform_buffer_test.cc @@ -17,9 +17,7 @@ using ::testing::HasSubstr; -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using GlslGeneratorImplTest_UniformBuffer = TestHelper; @@ -67,6 +65,4 @@ layout(binding = 0, std140) uniform Simple_1 { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_variable_decl_statement_test.cc b/src/tint/writer/glsl/generator_impl_variable_decl_statement_test.cc index 64c3b02013..29d5a41095 100644 --- a/src/tint/writer/glsl/generator_impl_variable_decl_statement_test.cc +++ b/src/tint/writer/glsl/generator_impl_variable_decl_statement_test.cc @@ -16,9 +16,7 @@ #include "src/tint/ast/variable_decl_statement.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using ::testing::HasSubstr; @@ -124,6 +122,4 @@ TEST_F(GlslGeneratorImplTest_VariableDecl, } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/generator_impl_workgroup_var_test.cc b/src/tint/writer/glsl/generator_impl_workgroup_var_test.cc index c33b168096..9c5a51b519 100644 --- a/src/tint/writer/glsl/generator_impl_workgroup_var_test.cc +++ b/src/tint/writer/glsl/generator_impl_workgroup_var_test.cc @@ -17,9 +17,7 @@ #include "src/tint/ast/stage_attribute.h" #include "src/tint/writer/glsl/test_helper.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { namespace { using ::testing::HasSubstr; @@ -56,6 +54,4 @@ TEST_F(GlslGeneratorImplTest_WorkgroupVar, Aliased) { } } // namespace -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl diff --git a/src/tint/writer/glsl/test_helper.h b/src/tint/writer/glsl/test_helper.h index cea266e43d..969490aa38 100644 --- a/src/tint/writer/glsl/test_helper.h +++ b/src/tint/writer/glsl/test_helper.h @@ -24,9 +24,7 @@ #include "src/tint/transform/manager.h" #include "src/tint/writer/glsl/generator_impl.h" -namespace tint { -namespace writer { -namespace glsl { +namespace tint::writer::glsl { /// Helper class for testing template @@ -102,8 +100,6 @@ using TestHelper = TestHelperBase; template using TestParamHelper = TestHelperBase>; -} // namespace glsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::glsl #endif // SRC_TINT_WRITER_GLSL_TEST_HELPER_H_