diff --git a/src/tint/writer/hlsl/generator.cc b/src/tint/writer/hlsl/generator.cc index b6aa19c433..a24d129983 100644 --- a/src/tint/writer/hlsl/generator.cc +++ b/src/tint/writer/hlsl/generator.cc @@ -16,9 +16,7 @@ #include "src/tint/writer/hlsl/generator_impl.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { Options::Options() = default; Options::~Options() = default; @@ -63,6 +61,4 @@ Result Generate(const Program* program, const Options& options) { return result; } -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator.h b/src/tint/writer/hlsl/generator.h index aa7cfa08a7..a2dcd0b04a 100644 --- a/src/tint/writer/hlsl/generator.h +++ b/src/tint/writer/hlsl/generator.h @@ -26,16 +26,15 @@ #include "src/tint/writer/array_length_from_uniform_options.h" #include "src/tint/writer/text.h" +// Forward declarations namespace tint { - -// Forward declarations class Program; - -namespace writer { -namespace hlsl { - -// Forward declarations +namespace writer::hlsl { class GeneratorImpl; +} // namespace writer::hlsl +} // namespace tint + +namespace tint::writer::hlsl { /// Configuration options used for generating HLSL. struct Options { @@ -99,8 +98,6 @@ struct Result { /// @returns the resulting HLSL and supplementary information Result Generate(const Program* program, const Options& options); -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl #endif // SRC_TINT_WRITER_HLSL_GENERATOR_H_ diff --git a/src/tint/writer/hlsl/generator_impl.cc b/src/tint/writer/hlsl/generator_impl.cc index fccbdcd473..110071f79e 100644 --- a/src/tint/writer/hlsl/generator_impl.cc +++ b/src/tint/writer/hlsl/generator_impl.cc @@ -73,9 +73,7 @@ #include "src/tint/writer/float_to_string.h" #include "src/tint/writer/generate_external_texture_bindings.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { const char kTempNamePrefix[] = "tint_tmp"; @@ -4028,6 +4026,4 @@ bool GeneratorImpl::CallBuiltinHelper(std::ostream& out, return true; } -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl.h b/src/tint/writer/hlsl/generator_impl.h index 84b533d9c5..96481c23c1 100644 --- a/src/tint/writer/hlsl/generator_impl.h +++ b/src/tint/writer/hlsl/generator_impl.h @@ -39,18 +39,15 @@ #include "src/tint/writer/array_length_from_uniform_options.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 hlsl { +namespace tint::writer::hlsl { /// The result of sanitizing a program for generation. struct SanitizedResult { @@ -539,8 +536,6 @@ class GeneratorImpl : public TextGenerator { std::unordered_map value_or_one_if_zero_; }; -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl #endif // SRC_TINT_WRITER_HLSL_GENERATOR_IMPL_H_ diff --git a/src/tint/writer/hlsl/generator_impl_array_accessor_test.cc b/src/tint/writer/hlsl/generator_impl_array_accessor_test.cc index 6746e7fbf1..bcf3ad1a03 100644 --- a/src/tint/writer/hlsl/generator_impl_array_accessor_test.cc +++ b/src/tint/writer/hlsl/generator_impl_array_accessor_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Expression = TestHelper; @@ -34,6 +32,4 @@ TEST_F(HlslGeneratorImplTest_Expression, IndexAccessor) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_assign_test.cc b/src/tint/writer/hlsl/generator_impl_assign_test.cc index 91f68d045f..6305dc0c09 100644 --- a/src/tint/writer/hlsl/generator_impl_assign_test.cc +++ b/src/tint/writer/hlsl/generator_impl_assign_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Assign = TestHelper; @@ -206,6 +204,4 @@ void fn() { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_binary_test.cc b/src/tint/writer/hlsl/generator_impl_binary_test.cc index 9d94a5a91a..f720db7a83 100644 --- a/src/tint/writer/hlsl/generator_impl_binary_test.cc +++ b/src/tint/writer/hlsl/generator_impl_binary_test.cc @@ -16,9 +16,7 @@ #include "src/tint/ast/variable_decl_statement.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Binary = TestHelper; @@ -823,6 +821,4 @@ void fn() { } // namespace HlslGeneratorDivMod } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_bitcast_test.cc b/src/tint/writer/hlsl/generator_impl_bitcast_test.cc index fcde73b33d..19c7ed78fb 100644 --- a/src/tint/writer/hlsl/generator_impl_bitcast_test.cc +++ b/src/tint/writer/hlsl/generator_impl_bitcast_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Bitcast = TestHelper; @@ -55,6 +53,4 @@ TEST_F(HlslGeneratorImplTest_Bitcast, EmitExpression_Bitcast_Uint) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_block_test.cc b/src/tint/writer/hlsl/generator_impl_block_test.cc index 9ad534fa24..2f6cd13fd7 100644 --- a/src/tint/writer/hlsl/generator_impl_block_test.cc +++ b/src/tint/writer/hlsl/generator_impl_block_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Block = TestHelper; @@ -37,6 +35,4 @@ TEST_F(HlslGeneratorImplTest_Block, Emit_Block) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_break_test.cc b/src/tint/writer/hlsl/generator_impl_break_test.cc index a3d6844e3d..4a2c038598 100644 --- a/src/tint/writer/hlsl/generator_impl_break_test.cc +++ b/src/tint/writer/hlsl/generator_impl_break_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Break = TestHelper; @@ -34,6 +32,4 @@ TEST_F(HlslGeneratorImplTest_Break, Emit_Break) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_builtin_test.cc b/src/tint/writer/hlsl/generator_impl_builtin_test.cc index 7e4150d070..95d59afa9d 100644 --- a/src/tint/writer/hlsl/generator_impl_builtin_test.cc +++ b/src/tint/writer/hlsl/generator_impl_builtin_test.cc @@ -18,9 +18,7 @@ #include "src/tint/sem/call.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using BuiltinType = sem::BuiltinType; @@ -730,6 +728,4 @@ void main() { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_builtin_texture_test.cc b/src/tint/writer/hlsl/generator_impl_builtin_texture_test.cc index e4e26b76f3..f11dd90879 100644 --- a/src/tint/writer/hlsl/generator_impl_builtin_texture_test.cc +++ b/src/tint/writer/hlsl/generator_impl_builtin_texture_test.cc @@ -18,9 +18,7 @@ #include "src/tint/ast/stage_attribute.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using ::testing::HasSubstr; @@ -391,6 +389,4 @@ INSTANTIATE_TEST_SUITE_P( testing::ValuesIn(ast::builtin::test::TextureOverloadCase::ValidCases())); } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_call_test.cc b/src/tint/writer/hlsl/generator_impl_call_test.cc index d1adc0ef4d..8a3289e9e6 100644 --- a/src/tint/writer/hlsl/generator_impl_call_test.cc +++ b/src/tint/writer/hlsl/generator_impl_call_test.cc @@ -15,9 +15,7 @@ #include "src/tint/ast/call_statement.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Call = TestHelper; @@ -76,6 +74,4 @@ TEST_F(HlslGeneratorImplTest_Call, EmitStatement_Call) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_case_test.cc b/src/tint/writer/hlsl/generator_impl_case_test.cc index 56ac282d3a..004ba410b0 100644 --- a/src/tint/writer/hlsl/generator_impl_case_test.cc +++ b/src/tint/writer/hlsl/generator_impl_case_test.cc @@ -15,9 +15,7 @@ #include "src/tint/ast/fallthrough_statement.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Case = TestHelper; @@ -110,6 +108,4 @@ TEST_F(HlslGeneratorImplTest_Case, Emit_Case_Default) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_cast_test.cc b/src/tint/writer/hlsl/generator_impl_cast_test.cc index f24b9d23dd..283c8590cd 100644 --- a/src/tint/writer/hlsl/generator_impl_cast_test.cc +++ b/src/tint/writer/hlsl/generator_impl_cast_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Cast = TestHelper; @@ -44,6 +42,4 @@ TEST_F(HlslGeneratorImplTest_Cast, EmitExpression_Cast_Vector) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_constructor_test.cc b/src/tint/writer/hlsl/generator_impl_constructor_test.cc index 4afcffe715..8801edd071 100644 --- a/src/tint/writer/hlsl/generator_impl_constructor_test.cc +++ b/src/tint/writer/hlsl/generator_impl_constructor_test.cc @@ -15,9 +15,7 @@ #include "gmock/gmock.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using ::testing::HasSubstr; @@ -259,6 +257,4 @@ TEST_F(HlslGeneratorImplTest_Constructor, EmitConstructor_Type_Struct_Empty) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_continue_test.cc b/src/tint/writer/hlsl/generator_impl_continue_test.cc index f487938495..5a9e07da63 100644 --- a/src/tint/writer/hlsl/generator_impl_continue_test.cc +++ b/src/tint/writer/hlsl/generator_impl_continue_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Continue = TestHelper; @@ -41,6 +39,4 @@ TEST_F(HlslGeneratorImplTest_Continue, Emit_Continue) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_discard_test.cc b/src/tint/writer/hlsl/generator_impl_discard_test.cc index 36322f5aa7..e8e52a9b5d 100644 --- a/src/tint/writer/hlsl/generator_impl_discard_test.cc +++ b/src/tint/writer/hlsl/generator_impl_discard_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Discard = TestHelper; @@ -34,6 +32,4 @@ TEST_F(HlslGeneratorImplTest_Discard, Emit_Discard) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_function_test.cc b/src/tint/writer/hlsl/generator_impl_function_test.cc index c3306efeed..15e9e86712 100644 --- a/src/tint/writer/hlsl/generator_impl_function_test.cc +++ b/src/tint/writer/hlsl/generator_impl_function_test.cc @@ -20,9 +20,7 @@ using ::testing::HasSubstr; -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Function = TestHelper; @@ -912,6 +910,4 @@ void b() { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_identifier_test.cc b/src/tint/writer/hlsl/generator_impl_identifier_test.cc index 56237f59af..d054bd8644 100644 --- a/src/tint/writer/hlsl/generator_impl_identifier_test.cc +++ b/src/tint/writer/hlsl/generator_impl_identifier_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Identifier = TestHelper; @@ -35,6 +33,4 @@ TEST_F(HlslGeneratorImplTest_Identifier, EmitIdentifierExpression) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_if_test.cc b/src/tint/writer/hlsl/generator_impl_if_test.cc index 63c551d261..f2e092cf9c 100644 --- a/src/tint/writer/hlsl/generator_impl_if_test.cc +++ b/src/tint/writer/hlsl/generator_impl_if_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_If = TestHelper; @@ -130,6 +128,4 @@ TEST_F(HlslGeneratorImplTest_If, Emit_IfWithMultiple) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_import_test.cc b/src/tint/writer/hlsl/generator_impl_import_test.cc index d80ba11dc6..ac415fe9e9 100644 --- a/src/tint/writer/hlsl/generator_impl_import_test.cc +++ b/src/tint/writer/hlsl/generator_impl_import_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Import = TestHelper; @@ -278,6 +276,4 @@ TEST_F(HlslGeneratorImplTest_Import, HlslImportData_Determinant) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_loop_test.cc b/src/tint/writer/hlsl/generator_impl_loop_test.cc index 82db0293a5..6932d3b7a3 100644 --- a/src/tint/writer/hlsl/generator_impl_loop_test.cc +++ b/src/tint/writer/hlsl/generator_impl_loop_test.cc @@ -15,9 +15,7 @@ #include "src/tint/ast/variable_decl_statement.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Loop = TestHelper; @@ -376,6 +374,4 @@ TEST_F(HlslGeneratorImplTest_Loop, Emit_ForLoopWithMultiStmtInitCondCont) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_member_accessor_test.cc b/src/tint/writer/hlsl/generator_impl_member_accessor_test.cc index 79be125f5a..8244767461 100644 --- a/src/tint/writer/hlsl/generator_impl_member_accessor_test.cc +++ b/src/tint/writer/hlsl/generator_impl_member_accessor_test.cc @@ -16,9 +16,7 @@ #include "src/tint/ast/stage_attribute.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using ::testing::HasSubstr; @@ -763,6 +761,4 @@ TEST_F(HlslGeneratorImplTest_MemberAccessor, Swizzle_gbr) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_module_constant_test.cc b/src/tint/writer/hlsl/generator_impl_module_constant_test.cc index 1de71ec203..30b0b0c227 100644 --- a/src/tint/writer/hlsl/generator_impl_module_constant_test.cc +++ b/src/tint/writer/hlsl/generator_impl_module_constant_test.cc @@ -15,9 +15,7 @@ #include "src/tint/ast/id_attribute.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_ModuleConstant = TestHelper; @@ -87,6 +85,4 @@ static const float b = WGSL_SPEC_CONSTANT_1; } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_return_test.cc b/src/tint/writer/hlsl/generator_impl_return_test.cc index cb266f1356..3f839fc1bf 100644 --- a/src/tint/writer/hlsl/generator_impl_return_test.cc +++ b/src/tint/writer/hlsl/generator_impl_return_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Return = TestHelper; @@ -46,6 +44,4 @@ TEST_F(HlslGeneratorImplTest_Return, Emit_ReturnWithValue) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc b/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc index 3a01bb5473..cb31f4d1d3 100644 --- a/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc +++ b/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc @@ -17,9 +17,7 @@ #include "src/tint/ast/variable_decl_statement.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslSanitizerTest = TestHelper; @@ -334,6 +332,4 @@ TEST_F(HlslSanitizerTest, InlinePtrLetsComplexChain) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_switch_test.cc b/src/tint/writer/hlsl/generator_impl_switch_test.cc index 40310a5817..792b64be6d 100644 --- a/src/tint/writer/hlsl/generator_impl_switch_test.cc +++ b/src/tint/writer/hlsl/generator_impl_switch_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest_Switch = TestHelper; @@ -66,6 +64,4 @@ TEST_F(HlslGeneratorImplTest_Switch, Emit_Switch_OnlyDefaultCase) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_test.cc b/src/tint/writer/hlsl/generator_impl_test.cc index d97ed31d46..ea479e46aa 100644 --- a/src/tint/writer/hlsl/generator_impl_test.cc +++ b/src/tint/writer/hlsl/generator_impl_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslGeneratorImplTest = TestHelper; @@ -67,6 +65,4 @@ INSTANTIATE_TEST_SUITE_P( HlslBuiltinData{ast::Builtin::kSampleMask, "SV_Coverage"})); } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_type_test.cc b/src/tint/writer/hlsl/generator_impl_type_test.cc index ce179a9d63..bea99cefe2 100644 --- a/src/tint/writer/hlsl/generator_impl_type_test.cc +++ b/src/tint/writer/hlsl/generator_impl_type_test.cc @@ -22,9 +22,7 @@ #include "src/tint/sem/storage_texture_type.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using ::testing::HasSubstr; @@ -566,6 +564,4 @@ INSTANTIATE_TEST_SUITE_P( "RWTexture1D tex : register(u1, space2);"})); } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_unary_op_test.cc b/src/tint/writer/hlsl/generator_impl_unary_op_test.cc index 2b376c01aa..3217a0194b 100644 --- a/src/tint/writer/hlsl/generator_impl_unary_op_test.cc +++ b/src/tint/writer/hlsl/generator_impl_unary_op_test.cc @@ -14,9 +14,7 @@ #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using HlslUnaryOpTest = TestHelper; @@ -88,6 +86,4 @@ TEST_F(HlslUnaryOpTest, Negation) { EXPECT_EQ(out.str(), "-(expr)"); } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_variable_decl_statement_test.cc b/src/tint/writer/hlsl/generator_impl_variable_decl_statement_test.cc index 7f16121a04..1188aed88b 100644 --- a/src/tint/writer/hlsl/generator_impl_variable_decl_statement_test.cc +++ b/src/tint/writer/hlsl/generator_impl_variable_decl_statement_test.cc @@ -16,9 +16,7 @@ #include "src/tint/ast/variable_decl_statement.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using ::testing::HasSubstr; @@ -122,6 +120,4 @@ TEST_F(HlslGeneratorImplTest_VariableDecl, } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/generator_impl_workgroup_var_test.cc b/src/tint/writer/hlsl/generator_impl_workgroup_var_test.cc index f59c71fbc6..641b8f1890 100644 --- a/src/tint/writer/hlsl/generator_impl_workgroup_var_test.cc +++ b/src/tint/writer/hlsl/generator_impl_workgroup_var_test.cc @@ -17,9 +17,7 @@ #include "src/tint/ast/stage_attribute.h" #include "src/tint/writer/hlsl/test_helper.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { namespace { using ::testing::HasSubstr; @@ -56,6 +54,4 @@ TEST_F(HlslGeneratorImplTest_WorkgroupVar, Aliased) { } } // namespace -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl diff --git a/src/tint/writer/hlsl/test_helper.h b/src/tint/writer/hlsl/test_helper.h index cac464506d..2fc800d191 100644 --- a/src/tint/writer/hlsl/test_helper.h +++ b/src/tint/writer/hlsl/test_helper.h @@ -25,9 +25,7 @@ #include "src/tint/writer/hlsl/generator.h" #include "src/tint/writer/hlsl/generator_impl.h" -namespace tint { -namespace writer { -namespace hlsl { +namespace tint::writer::hlsl { /// Helper class for testing template @@ -116,8 +114,6 @@ using TestHelper = TestHelperBase; template using TestParamHelper = TestHelperBase>; -} // namespace hlsl -} // namespace writer -} // namespace tint +} // namespace tint::writer::hlsl #endif // SRC_TINT_WRITER_HLSL_TEST_HELPER_H_