Condense namespaces in tint/fuzzers.
This PR condenses the namespaces in the tint/fuzzers folder.
Change-Id: I74d4db39e41d408a826bee89241c5752e1aa7df9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86036
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/fuzzers/cli.cc b/src/tint/fuzzers/cli.cc
index 2a0b814..b8abbf3 100644
--- a/src/tint/fuzzers/cli.cc
+++ b/src/tint/fuzzers/cli.cc
@@ -21,8 +21,7 @@
#include <string>
#include <utility>
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
namespace {
const char* const kHelpMessage = R"(
@@ -112,5 +111,4 @@
return cli_params;
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/cli.h b/src/tint/fuzzers/cli.h
index 02ca3db..df50042 100644
--- a/src/tint/fuzzers/cli.h
+++ b/src/tint/fuzzers/cli.h
@@ -17,8 +17,7 @@
#include <cstdint>
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
/// CLI parameters accepted by the fuzzer. Type -tint_help in the CLI to see the
/// help message
@@ -40,7 +39,6 @@
/// @return parsed parameters.
CliParams ParseCliParams(int* argc, char** argv);
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
#endif // SRC_TINT_FUZZERS_CLI_H_
diff --git a/src/tint/fuzzers/data_builder.h b/src/tint/fuzzers/data_builder.h
index e0c104a..a2292ab 100644
--- a/src/tint/fuzzers/data_builder.h
+++ b/src/tint/fuzzers/data_builder.h
@@ -25,8 +25,7 @@
#include "src/tint/writer/hlsl/generator.h"
#include "src/tint/writer/msl/generator.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
/// Builder for generic pseudo-random data
class DataBuilder {
@@ -240,7 +239,6 @@
};
};
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
#endif // SRC_TINT_FUZZERS_DATA_BUILDER_H_
diff --git a/src/tint/fuzzers/fuzzer_init.cc b/src/tint/fuzzers/fuzzer_init.cc
index ac9a4cf..1fc5e52 100644
--- a/src/tint/fuzzers/fuzzer_init.cc
+++ b/src/tint/fuzzers/fuzzer_init.cc
@@ -15,8 +15,7 @@
#include "src/tint/fuzzers/fuzzer_init.h"
#include "src/tint/fuzzers/cli.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
namespace {
CliParams cli_params;
@@ -31,5 +30,4 @@
return 0;
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/fuzzer_init.h b/src/tint/fuzzers/fuzzer_init.h
index b81a850..772543c 100644
--- a/src/tint/fuzzers/fuzzer_init.h
+++ b/src/tint/fuzzers/fuzzer_init.h
@@ -17,13 +17,11 @@
#include "src/tint/fuzzers/cli.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
/// Returns the common CliParams parsed and populated by LLVMFuzzerInitialize()
const CliParams& GetCliParams();
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
#endif // SRC_TINT_FUZZERS_FUZZER_INIT_H_
diff --git a/src/tint/fuzzers/mersenne_twister_engine.cc b/src/tint/fuzzers/mersenne_twister_engine.cc
index 5acba2b..2f55cff 100644
--- a/src/tint/fuzzers/mersenne_twister_engine.cc
+++ b/src/tint/fuzzers/mersenne_twister_engine.cc
@@ -19,8 +19,7 @@
#include "src/tint/utils/hash.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
namespace {
@@ -55,5 +54,4 @@
std::independent_bits_engine<std::mt19937_64, 8, uint8_t>(engine_));
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/mersenne_twister_engine.h b/src/tint/fuzzers/mersenne_twister_engine.h
index c482953..9308d33 100644
--- a/src/tint/fuzzers/mersenne_twister_engine.h
+++ b/src/tint/fuzzers/mersenne_twister_engine.h
@@ -19,8 +19,7 @@
#include "src/tint/fuzzers/random_generator_engine.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
/// Standard MT based random number generation
class MersenneTwisterEngine : public RandomGeneratorEngine {
@@ -55,7 +54,6 @@
std::mt19937_64 engine_;
}; // class MersenneTwisterEngine
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
#endif // SRC_TINT_FUZZERS_MERSENNE_TWISTER_ENGINE_H_
diff --git a/src/tint/fuzzers/random_generator.cc b/src/tint/fuzzers/random_generator.cc
index 6b3c98a..8ad211f 100644
--- a/src/tint/fuzzers/random_generator.cc
+++ b/src/tint/fuzzers/random_generator.cc
@@ -22,8 +22,7 @@
#include "src/tint/fuzzers/random_generator_engine.h"
#include "src/tint/utils/hash.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
namespace {
@@ -120,5 +119,4 @@
auto hash_size = static_cast<size_t>(hash_end_i64) - hash_begin;
return HashBuffer(data + hash_begin, hash_size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/random_generator.h b/src/tint/fuzzers/random_generator.h
index bb9a46f..bbdacfd 100644
--- a/src/tint/fuzzers/random_generator.h
+++ b/src/tint/fuzzers/random_generator.h
@@ -21,8 +21,7 @@
#include "src/tint/fuzzers/random_generator_engine.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
/// Pseudo random generator utility class for fuzzing
class RandomGenerator {
@@ -112,7 +111,6 @@
std::unique_ptr<RandomGeneratorEngine> engine_;
}; // class RandomGenerator
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
#endif // SRC_TINT_FUZZERS_RANDOM_GENERATOR_H_
diff --git a/src/tint/fuzzers/random_generator_engine.cc b/src/tint/fuzzers/random_generator_engine.cc
index 2e861e3..d171788 100644
--- a/src/tint/fuzzers/random_generator_engine.cc
+++ b/src/tint/fuzzers/random_generator_engine.cc
@@ -14,13 +14,11 @@
#include "src/tint/fuzzers/random_generator_engine.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
// Not in header to avoid weak vtable warnings from clang
RandomGeneratorEngine::RandomGeneratorEngine() = default;
RandomGeneratorEngine::~RandomGeneratorEngine() = default;
RandomGeneratorEngine::RandomGeneratorEngine(RandomGeneratorEngine&&) = default;
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/random_generator_engine.h b/src/tint/fuzzers/random_generator_engine.h
index eb9e716..9804727 100644
--- a/src/tint/fuzzers/random_generator_engine.h
+++ b/src/tint/fuzzers/random_generator_engine.h
@@ -19,8 +19,7 @@
#include <random>
#include <vector>
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
/// Wrapper interface around STL random number engine
class RandomGeneratorEngine {
@@ -57,7 +56,6 @@
RandomGeneratorEngine& operator=(const RandomGeneratorEngine&) = delete;
}; // class RandomGeneratorEngine
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
#endif // SRC_TINT_FUZZERS_RANDOM_GENERATOR_ENGINE_H_
diff --git a/src/tint/fuzzers/random_generator_test.cc b/src/tint/fuzzers/random_generator_test.cc
index 182e7ab..95916cb 100644
--- a/src/tint/fuzzers/random_generator_test.cc
+++ b/src/tint/fuzzers/random_generator_test.cc
@@ -20,8 +20,7 @@
#include "src/tint/fuzzers/mersenne_twister_engine.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
namespace {
/// Implementation of RandomGeneratorEngine that just returns a stream of
@@ -198,5 +197,4 @@
}
} // namespace
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/shuffle_transform.cc b/src/tint/fuzzers/shuffle_transform.cc
index 4061104..b2752b9 100644
--- a/src/tint/fuzzers/shuffle_transform.cc
+++ b/src/tint/fuzzers/shuffle_transform.cc
@@ -18,8 +18,7 @@
#include "src/tint/program_builder.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
ShuffleTransform::ShuffleTransform(size_t seed) : seed_(seed) {}
@@ -34,5 +33,4 @@
}
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/shuffle_transform.h b/src/tint/fuzzers/shuffle_transform.h
index 4674d35..5df6bdd 100644
--- a/src/tint/fuzzers/shuffle_transform.h
+++ b/src/tint/fuzzers/shuffle_transform.h
@@ -17,8 +17,7 @@
#include "src/tint/transform/transform.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
/// ShuffleTransform reorders the module scope declarations into a random order
class ShuffleTransform : public tint::transform::Transform {
@@ -36,7 +35,6 @@
size_t seed_;
};
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
#endif // SRC_TINT_FUZZERS_SHUFFLE_TRANSFORM_H_
diff --git a/src/tint/fuzzers/tint_all_transforms_fuzzer.cc b/src/tint/fuzzers/tint_all_transforms_fuzzer.cc
index 356a53c..d2e866f 100644
--- a/src/tint/fuzzers/tint_all_transforms_fuzzer.cc
+++ b/src/tint/fuzzers/tint_all_transforms_fuzzer.cc
@@ -17,8 +17,7 @@
#include "src/tint/fuzzers/tint_common_fuzzer.h"
#include "src/tint/fuzzers/transform_builder.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
{
@@ -81,5 +80,4 @@
return 0;
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/cli.cc b/src/tint/fuzzers/tint_ast_fuzzer/cli.cc
index 34a7d92..ace19d6 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/cli.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/cli.cc
@@ -21,9 +21,7 @@
#include <string>
#include <utility>
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
namespace {
const char* const kHelpMessage = R"(
@@ -162,6 +160,4 @@
return cli_params;
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/cli.h b/src/tint/fuzzers/tint_ast_fuzzer/cli.h
index ed1bfaa..ccdf2f2 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/cli.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/cli.h
@@ -17,9 +17,7 @@
#include <cstdint>
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// The backend this fuzzer will test.
enum class FuzzingTarget {
@@ -65,8 +63,6 @@
/// @return parsed parameters.
CliParams ParseCliParams(int* argc, char** argv);
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_CLI_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/expression_size_test.cc b/src/tint/fuzzers/tint_ast_fuzzer/expression_size_test.cc
index bb6e5e7..b5118d9 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/expression_size_test.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/expression_size_test.cc
@@ -24,9 +24,7 @@
#include "src/tint/program.h"
#include "src/tint/reader/wgsl/parser.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
namespace {
TEST(ExpressionSizeTest, Basic) {
@@ -65,6 +63,4 @@
}
} // namespace
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/fuzzer.cc b/src/tint/fuzzers/tint_ast_fuzzer/fuzzer.cc
index 5570e06..e2561da 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/fuzzer.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/fuzzer.cc
@@ -25,9 +25,7 @@
#include "src/tint/reader/wgsl/parser.h"
#include "src/tint/writer/wgsl/generator.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
namespace {
CliParams cli_params{};
@@ -129,6 +127,4 @@
}
} // namespace
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutation.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutation.cc
index c3c89a6..1ea3948 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutation.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutation.cc
@@ -20,9 +20,7 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier.h"
#include "src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
Mutation::~Mutation() = default;
@@ -45,6 +43,4 @@
return nullptr;
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutation.h b/src/tint/fuzzers/tint_ast_fuzzer/mutation.h
index cc1afdd..405f7bd 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutation.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutation.h
@@ -24,9 +24,7 @@
#include "src/tint/clone_context.h"
#include "src/tint/program.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// The base class for all the mutations in the fuzzer. Children must override
/// three methods:
@@ -79,8 +77,6 @@
using MutationList = std::vector<std::unique_ptr<Mutation>>;
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_MUTATION_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.cc
index 7344320..64a13fb 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.cc
@@ -14,12 +14,8 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
MutationFinder::~MutationFinder() = default;
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.h b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.h
index d13a440..0d082c1 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.h
@@ -24,9 +24,7 @@
#include "src/tint/program.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// Instances of this class traverse the `tint::Program`, looking for
/// opportunities to apply mutations and return them to the caller.
@@ -70,8 +68,6 @@
using MutationFinderList = std::vector<std::unique_ptr<MutationFinder>>;
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_MUTATION_FINDER_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/change_binary_operators.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/change_binary_operators.cc
index dbfc36e..737c39f 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/change_binary_operators.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/change_binary_operators.cc
@@ -20,9 +20,7 @@
#include "src/tint/ast/binary_expression.h"
#include "src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
MutationList MutationFinderChangeBinaryOperators::FindMutations(
const tint::Program& program,
@@ -87,6 +85,4 @@
return probability_context->GetChanceOfChangingBinaryOperators();
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/change_binary_operators.h b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/change_binary_operators.h
index 460196a..e494dae 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/change_binary_operators.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/change_binary_operators.h
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// Looks for opportunities to apply `MutationChangeBinaryOperator`.
///
@@ -35,8 +33,6 @@
ProbabilityContext* probability_context) const override;
};
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_MUTATION_FINDERS_CHANGE_BINARY_OPERATORS_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/replace_identifiers.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/replace_identifiers.cc
index 59e0fa2..e3269da 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/replace_identifiers.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/replace_identifiers.cc
@@ -23,9 +23,7 @@
#include "src/tint/sem/statement.h"
#include "src/tint/sem/variable.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
MutationList MutationFinderReplaceIdentifiers::FindMutations(
const tint::Program& program,
@@ -74,6 +72,4 @@
return probability_context->GetChanceOfReplacingIdentifiers();
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/replace_identifiers.h b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/replace_identifiers.h
index 2d8d70e..8e760c6 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/replace_identifiers.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/replace_identifiers.h
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// Looks for opportunities to apply `MutationReplaceIdentifier`.
///
@@ -35,8 +33,6 @@
ProbabilityContext* probability_context) const override;
};
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_MUTATION_FINDERS_REPLACE_IDENTIFIERS_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/wrap_unary_operators.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/wrap_unary_operators.cc
index 52cbc45..c34c6fb 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/wrap_unary_operators.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/wrap_unary_operators.cc
@@ -23,9 +23,7 @@
#include "src/tint/sem/expression.h"
#include "src/tint/sem/statement.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
namespace {
const size_t kMaxExpressionSize = 50;
@@ -87,6 +85,4 @@
return probability_context->GetChanceOfWrappingUnaryOperators();
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/wrap_unary_operators.h b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/wrap_unary_operators.h
index 02538fc..fe70bf5 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/wrap_unary_operators.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutation_finders/wrap_unary_operators.h
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/mutation_finder.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// Looks for opportunities to apply
/// `MutationFinderWrapUnaryOperators`.
@@ -36,8 +34,6 @@
ProbabilityContext* probability_context) const override;
};
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_MUTATION_FINDERS_WRAP_UNARY_OPERATORS_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator.cc
index 60a2a1c..4b4888b 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator.cc
@@ -18,9 +18,7 @@
#include "src/tint/sem/reference_type.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
namespace {
@@ -484,6 +482,4 @@
return mutation;
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator.h b/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator.h
index 73ac22b..9ce3890 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator.h
@@ -21,9 +21,7 @@
#include "src/tint/program.h"
#include "src/tint/sem/variable.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// @see MutationChangeBinaryOperator::Apply
class MutationChangeBinaryOperator : public Mutation {
@@ -78,8 +76,6 @@
protobufs::MutationChangeBinaryOperator message_;
};
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_MUTATIONS_CHANGE_BINARY_OPERATOR_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator_test.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator_test.cc
index d9994e3..f8a9d90 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator_test.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_binary_operator_test.cc
@@ -26,9 +26,7 @@
#include "src/tint/reader/wgsl/parser.h"
#include "src/tint/writer/wgsl/generator.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
namespace {
std::string OpToString(ast::BinaryOp op) {
@@ -719,6 +717,4 @@
}
} // namespace
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier.cc
index 7f09dcc..0daa82a 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier.cc
@@ -19,9 +19,7 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/util.h"
#include "src/tint/program_builder.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
MutationReplaceIdentifier::MutationReplaceIdentifier(
protobufs::MutationReplaceIdentifier message)
@@ -101,6 +99,4 @@
return mutation;
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier.h b/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier.h
index 553b8b4..2d50c30 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier.h
@@ -19,9 +19,7 @@
#include "src/tint/sem/variable.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// @see MutationReplaceIdentifier::Apply
class MutationReplaceIdentifier : public Mutation {
@@ -70,8 +68,6 @@
protobufs::MutationReplaceIdentifier message_;
};
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_MUTATIONS_REPLACE_IDENTIFIER_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier_test.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier_test.cc
index bdb730c..9e82e11 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier_test.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutations/replace_identifier_test.cc
@@ -25,9 +25,7 @@
#include "src/tint/reader/wgsl/parser.h"
#include "src/tint/writer/wgsl/generator.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
namespace {
TEST(ReplaceIdentifierTest, NotApplicable_Simple) {
@@ -663,6 +661,4 @@
}
} // namespace
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator.cc
index 1f5d5ae..d9db3e3 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator.cc
@@ -19,9 +19,7 @@
#include "src/tint/program_builder.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
MutationWrapUnaryOperator::MutationWrapUnaryOperator(
protobufs::MutationWrapUnaryOperator message)
@@ -122,6 +120,4 @@
return {};
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator.h b/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator.h
index 25fec00..85293ee 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator.h
@@ -21,9 +21,7 @@
#include "src/tint/sem/variable.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// @see MutationWrapUnaryOperator::Apply
class MutationWrapUnaryOperator : public Mutation {
@@ -78,8 +76,6 @@
protobufs::MutationWrapUnaryOperator message_;
};
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_MUTATIONS_WRAP_UNARY_OPERATOR_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator_test.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator_test.cc
index 4b8435e..bbbe7a0 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator_test.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator_test.cc
@@ -24,9 +24,7 @@
#include "src/tint/reader/wgsl/parser.h"
#include "src/tint/writer/wgsl/generator.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
namespace {
TEST(WrapUnaryOperatorTest, Applicable1) {
@@ -543,6 +541,4 @@
}
} // namespace
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutator.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutator.cc
index ab73a3a..e4915c6 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutator.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutator.cc
@@ -26,9 +26,7 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/node_id_map.h"
#include "src/tint/program_builder.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
namespace {
template <typename T, typename... Args>
@@ -184,6 +182,4 @@
return program;
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutator.h b/src/tint/fuzzers/tint_ast_fuzzer/mutator.h
index d700b70..7b9dd74 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutator.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutator.h
@@ -23,9 +23,7 @@
#include "src/tint/program.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// @file
/// @brief Tries to apply a `mutation` to the `program`.
@@ -94,8 +92,6 @@
uint32_t max_applied_mutations,
protobufs::MutationSequence* mutation_sequence);
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_MUTATOR_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/node_id_map.cc b/src/tint/fuzzers/tint_ast_fuzzer/node_id_map.cc
index 117fd2d..de6b4be 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/node_id_map.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/node_id_map.cc
@@ -16,9 +16,7 @@
#include <cassert>
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
NodeIdMap::NodeIdMap() = default;
@@ -60,6 +58,4 @@
return fresh_id_++;
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/node_id_map.h b/src/tint/fuzzers/tint_ast_fuzzer/node_id_map.h
index 1aae93f..4fee370 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/node_id_map.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/node_id_map.h
@@ -19,9 +19,7 @@
#include "src/tint/program.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// Contains a one-to-one mapping between the nodes in the AST of the program
/// and their ids.
@@ -89,8 +87,6 @@
std::unordered_map<IdType, const ast::Node*> id_to_node_;
};
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_NODE_ID_MAP_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/override_cli_params.h b/src/tint/fuzzers/tint_ast_fuzzer/override_cli_params.h
index 31b2946..971ba47 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/override_cli_params.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/override_cli_params.h
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/cli.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// @brief Allows CLI parameters to be overridden.
///
@@ -29,8 +27,6 @@
/// @param cli_params - the parsed CLI parameters to be updated.
void OverrideCliParams(CliParams& cli_params);
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_OVERRIDE_CLI_PARAMS_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/probability_context.cc b/src/tint/fuzzers/tint_ast_fuzzer/probability_context.cc
index 1d9461f..596e056 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/probability_context.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/probability_context.cc
@@ -16,9 +16,7 @@
#include <cassert>
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
namespace {
const std::pair<uint32_t, uint32_t> kChanceOfChangingBinaryOperators = {30, 90};
@@ -45,6 +43,4 @@
range.first, range.second + 1); // + 1 need since range is inclusive.
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/probability_context.h b/src/tint/fuzzers/tint_ast_fuzzer/probability_context.h
index eacc1bd..6d9a4ec 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/probability_context.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/probability_context.h
@@ -20,9 +20,7 @@
#include "src/tint/fuzzers/random_generator.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
/// This class is intended to be used by the `MutationFinder`s to introduce some
/// variance to the mutation process.
@@ -82,8 +80,6 @@
uint32_t chance_of_wrapping_unary_operators_;
};
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_PROBABILITY_CONTEXT_H_
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_fuzzer.cc b/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_fuzzer.cc
index 77b00c4..939fb4e 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_fuzzer.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_fuzzer.cc
@@ -15,14 +15,10 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_ast_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
void OverrideCliParams(CliParams& /*unused*/) {
// Leave the CLI parameters unchanged.
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_hlsl_writer_fuzzer.cc b/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_hlsl_writer_fuzzer.cc
index a1d886e..1123cf0 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_hlsl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_hlsl_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_ast_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
void OverrideCliParams(CliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kHlsl;
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_msl_writer_fuzzer.cc b/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_msl_writer_fuzzer.cc
index 8354ac3..2b97cd5 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_msl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_msl_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_ast_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
void OverrideCliParams(CliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kMsl;
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_spv_writer_fuzzer.cc b/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_spv_writer_fuzzer.cc
index 266ef6a..e776b6c 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_spv_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_spv_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_ast_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
void OverrideCliParams(CliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kSpv;
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_wgsl_writer_fuzzer.cc b/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_wgsl_writer_fuzzer.cc
index ede740f..9d0a899 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_wgsl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/tint_ast_wgsl_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_ast_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_ast_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
+namespace tint::fuzzers::ast_fuzzer {
void OverrideCliParams(CliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kWgsl;
}
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/util.h b/src/tint/fuzzers/tint_ast_fuzzer/util.h
index 019fdec..c2482a3 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/util.h
+++ b/src/tint/fuzzers/tint_ast_fuzzer/util.h
@@ -26,10 +26,7 @@
#include "src/tint/sem/statement.h"
#include "src/tint/sem/variable.h"
-namespace tint {
-namespace fuzzers {
-namespace ast_fuzzer {
-namespace util {
+namespace tint::fuzzers::ast_fuzzer::util {
/// @file
/// @brief Returns all in-scope variables (including formal function parameters)
@@ -101,9 +98,6 @@
return result;
}
-} // namespace util
-} // namespace ast_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::ast_fuzzer::util
#endif // SRC_TINT_FUZZERS_TINT_AST_FUZZER_UTIL_H_
diff --git a/src/tint/fuzzers/tint_binding_remapper_fuzzer.cc b/src/tint/fuzzers/tint_binding_remapper_fuzzer.cc
index f736cca..30f4c66 100644
--- a/src/tint/fuzzers/tint_binding_remapper_fuzzer.cc
+++ b/src/tint/fuzzers/tint_binding_remapper_fuzzer.cc
@@ -16,8 +16,7 @@
#include "src/tint/fuzzers/tint_common_fuzzer.h"
#include "src/tint/fuzzers/transform_builder.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
TransformBuilder tb(data, size);
@@ -31,5 +30,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_common_fuzzer.cc b/src/tint/fuzzers/tint_common_fuzzer.cc
index b8bfe08..a8bc4cd 100644
--- a/src/tint/fuzzers/tint_common_fuzzer.cc
+++ b/src/tint/fuzzers/tint_common_fuzzer.cc
@@ -32,8 +32,7 @@
#include "src/tint/program.h"
#include "src/tint/utils/hash.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
namespace {
@@ -346,5 +345,4 @@
}
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_common_fuzzer.h b/src/tint/fuzzers/tint_common_fuzzer.h
index 50bfb61..9ea7513 100644
--- a/src/tint/fuzzers/tint_common_fuzzer.h
+++ b/src/tint/fuzzers/tint_common_fuzzer.h
@@ -26,8 +26,7 @@
#include "src/tint/fuzzers/data_builder.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
// TODO(crbug.com/tint/1356): Add using shader reflection to generate options
// that are potentially valid for Generate*Options
@@ -156,7 +155,6 @@
void RunInspector(Program* program);
};
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
#endif // SRC_TINT_FUZZERS_TINT_COMMON_FUZZER_H_
diff --git a/src/tint/fuzzers/tint_first_index_offset_fuzzer.cc b/src/tint/fuzzers/tint_first_index_offset_fuzzer.cc
index f8d437c..b5e79d1 100644
--- a/src/tint/fuzzers/tint_first_index_offset_fuzzer.cc
+++ b/src/tint/fuzzers/tint_first_index_offset_fuzzer.cc
@@ -16,8 +16,7 @@
#include "src/tint/fuzzers/tint_common_fuzzer.h"
#include "src/tint/fuzzers/transform_builder.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
TransformBuilder tb(data, size);
@@ -31,5 +30,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_reader_writer_fuzzer.h b/src/tint/fuzzers/tint_reader_writer_fuzzer.h
index e4a4e37..8da4cff 100644
--- a/src/tint/fuzzers/tint_reader_writer_fuzzer.h
+++ b/src/tint/fuzzers/tint_reader_writer_fuzzer.h
@@ -20,8 +20,7 @@
#include "src/tint/fuzzers/tint_common_fuzzer.h"
#include "src/tint/fuzzers/transform_builder.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
/// Wrapper around the common fuzzing class for tint_*_reader_*_writter fuzzers
class ReaderWriterFuzzer : public CommonFuzzer {
@@ -66,7 +65,6 @@
std::unique_ptr<TransformBuilder> tb_;
};
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
#endif // SRC_TINT_FUZZERS_TINT_READER_WRITER_FUZZER_H_
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/cli.cc b/src/tint/fuzzers/tint_regex_fuzzer/cli.cc
index 1fd3e10..2aeaf71 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/cli.cc
+++ b/src/tint/fuzzers/tint_regex_fuzzer/cli.cc
@@ -21,9 +21,7 @@
#include <string>
#include <utility>
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
namespace {
const char* const kHelpMessage = R"(
@@ -121,6 +119,4 @@
return cli_params;
}
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/cli.h b/src/tint/fuzzers/tint_regex_fuzzer/cli.h
index 55048c5..685f66d 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/cli.h
+++ b/src/tint/fuzzers/tint_regex_fuzzer/cli.h
@@ -17,9 +17,7 @@
#include <cstdint>
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
/// The backend this fuzzer will test.
enum class FuzzingTarget {
@@ -57,8 +55,6 @@
/// @return parsed parameters.
CliParams ParseCliParams(int* argc, char** argv);
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_REGEX_FUZZER_CLI_H_
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/fuzzer.cc b/src/tint/fuzzers/tint_regex_fuzzer/fuzzer.cc
index bc8dc78..c74c508 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/fuzzer.cc
+++ b/src/tint/fuzzers/tint_regex_fuzzer/fuzzer.cc
@@ -25,9 +25,7 @@
#include "src/tint/reader/wgsl/parser.h"
#include "src/tint/writer/wgsl/generator.h"
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
namespace {
CliParams cli_params{};
@@ -151,6 +149,4 @@
}
} // namespace
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/override_cli_params.h b/src/tint/fuzzers/tint_regex_fuzzer/override_cli_params.h
index 445f524..777145f 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/override_cli_params.h
+++ b/src/tint/fuzzers/tint_regex_fuzzer/override_cli_params.h
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_regex_fuzzer/cli.h"
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
/// @brief Allows CLI parameters to be overridden.
///
@@ -29,8 +27,6 @@
/// @param cli_params - the parsed CLI parameters to be updated.
void OverrideCliParams(CliParams& cli_params);
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_REGEX_FUZZER_OVERRIDE_CLI_PARAMS_H_
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/regex_fuzzer_tests.cc b/src/tint/fuzzers/tint_regex_fuzzer/regex_fuzzer_tests.cc
index d58942d..33d3c8d 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/regex_fuzzer_tests.cc
+++ b/src/tint/fuzzers/tint_regex_fuzzer/regex_fuzzer_tests.cc
@@ -18,9 +18,7 @@
#include "src/tint/fuzzers/tint_regex_fuzzer/wgsl_mutator.h"
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
namespace {
// Swaps two non-consecutive regions in the edge
@@ -516,6 +514,4 @@
}
} // namespace
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_fuzzer.cc b/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_fuzzer.cc
index 045ecfd..77c145c 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_fuzzer.cc
+++ b/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_fuzzer.cc
@@ -15,14 +15,10 @@
#include "src/tint/fuzzers/tint_regex_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_regex_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
void OverrideCliParams(CliParams& /*unused*/) {
// Leave the CLI parameters unchanged.
}
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_hlsl_writer_fuzzer.cc b/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_hlsl_writer_fuzzer.cc
index e89dd97..dea4e11 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_hlsl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_hlsl_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_regex_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_regex_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
void OverrideCliParams(CliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kHlsl;
}
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_msl_writer_fuzzer.cc b/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_msl_writer_fuzzer.cc
index 23afc86..07b59c5 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_msl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_msl_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_regex_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_regex_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
void OverrideCliParams(CliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kMsl;
}
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_spv_writer_fuzzer.cc b/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_spv_writer_fuzzer.cc
index 18a1a3e..95fec21 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_spv_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_spv_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_regex_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_regex_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
void OverrideCliParams(CliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kSpv;
}
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_wgsl_writer_fuzzer.cc b/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_wgsl_writer_fuzzer.cc
index 8fbd395..dfaf3a3 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_wgsl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_regex_fuzzer/tint_regex_wgsl_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_regex_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_regex_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
void OverrideCliParams(CliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kWgsl;
}
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/wgsl_mutator.cc b/src/tint/fuzzers/tint_regex_fuzzer/wgsl_mutator.cc
index b8d9160..2397e7f 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/wgsl_mutator.cc
+++ b/src/tint/fuzzers/tint_regex_fuzzer/wgsl_mutator.cc
@@ -24,9 +24,7 @@
#include "src/tint/fuzzers/random_generator.h"
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
std::vector<size_t> FindDelimiterIndices(const std::string& delimiter,
const std::string& wgsl_code) {
@@ -353,6 +351,4 @@
return true;
}
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
diff --git a/src/tint/fuzzers/tint_regex_fuzzer/wgsl_mutator.h b/src/tint/fuzzers/tint_regex_fuzzer/wgsl_mutator.h
index 47e6adb..ec3bbef 100644
--- a/src/tint/fuzzers/tint_regex_fuzzer/wgsl_mutator.h
+++ b/src/tint/fuzzers/tint_regex_fuzzer/wgsl_mutator.h
@@ -21,9 +21,7 @@
#include "src/tint/fuzzers/random_generator.h"
-namespace tint {
-namespace fuzzers {
-namespace regex_fuzzer {
+namespace tint::fuzzers::regex_fuzzer {
/// A function that given a delimiter, returns a vector that contains
/// all the positions of the delimiter in the WGSL code.
@@ -179,8 +177,6 @@
/// @param generator - the random number generator.
/// @return true if the mutation was succesful or false otherwise.
bool InsertReturnStatement(std::string& wgsl_code, RandomGenerator& generator);
-} // namespace regex_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::regex_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_REGEX_FUZZER_WGSL_MUTATOR_H_
diff --git a/src/tint/fuzzers/tint_renamer_fuzzer.cc b/src/tint/fuzzers/tint_renamer_fuzzer.cc
index 02e539c..26a3f65 100644
--- a/src/tint/fuzzers/tint_renamer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_renamer_fuzzer.cc
@@ -16,8 +16,7 @@
#include "src/tint/fuzzers/tint_common_fuzzer.h"
#include "src/tint/fuzzers/transform_builder.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
TransformBuilder tb(data, size);
@@ -31,5 +30,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_robustness_fuzzer.cc b/src/tint/fuzzers/tint_robustness_fuzzer.cc
index 22f0ad1..8fd049a 100644
--- a/src/tint/fuzzers/tint_robustness_fuzzer.cc
+++ b/src/tint/fuzzers/tint_robustness_fuzzer.cc
@@ -16,8 +16,7 @@
#include "src/tint/fuzzers/tint_common_fuzzer.h"
#include "src/tint/fuzzers/transform_builder.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
TransformBuilder tb(data, size);
@@ -31,5 +30,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_single_entry_point_fuzzer.cc b/src/tint/fuzzers/tint_single_entry_point_fuzzer.cc
index 84146d8..3d62c65 100644
--- a/src/tint/fuzzers/tint_single_entry_point_fuzzer.cc
+++ b/src/tint/fuzzers/tint_single_entry_point_fuzzer.cc
@@ -16,8 +16,7 @@
#include "src/tint/fuzzers/tint_common_fuzzer.h"
#include "src/tint/fuzzers/transform_builder.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
TransformBuilder tb(data, size);
@@ -31,5 +30,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.cc
index 7659fcc..b5e46fd 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.cc
@@ -24,9 +24,7 @@
#include "source/opt/build_module.h"
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/util.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
namespace {
const char* const kMutatorParameters = R"(
@@ -479,6 +477,4 @@
return cli_params;
}
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.h b/src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.h
index 6e6d60b..2ab26c6 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.h
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.h
@@ -20,9 +20,7 @@
#include "source/fuzz/fuzzer.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
/// Default SPIR-V environment that will be used during fuzzing.
const auto kDefaultTargetEnv = SPV_ENV_VULKAN_1_1;
@@ -160,8 +158,6 @@
MutatorDebuggerCliParams ParseMutatorDebuggerCliParams(int argc,
const char* const* argv);
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_SPIRV_TOOLS_FUZZER_CLI_H_
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc
index d17d743..dd2e9d3 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc
@@ -28,9 +28,7 @@
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_reduce_mutator.h"
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/util.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
namespace {
struct Context {
@@ -258,6 +256,4 @@
}
} // namespace
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator.cc
index 05dcc41..cba5e52 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator.cc
@@ -14,9 +14,7 @@
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
// We need to define constructor here so that vtable is produced in this
// translation unit (see -Wweak-vtables clang flag).
@@ -29,6 +27,4 @@
"Returning invalid result state");
}
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator.h b/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator.h
index 9ff8fd9..faee9b7 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator.h
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator.h
@@ -20,9 +20,7 @@
#include <string>
#include <vector>
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
/// This is an interface that is used to define custom mutators based on the
/// SPIR-V tools.
@@ -101,8 +99,6 @@
virtual std::string GetErrors() const = 0;
};
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_SPIRV_TOOLS_FUZZER_MUTATOR_H_
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator_cache.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator_cache.cc
index 4ce1ad2..82afcce 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator_cache.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator_cache.cc
@@ -14,9 +14,7 @@
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator_cache.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
MutatorCache::MutatorCache(size_t max_size)
: map_(), entries_(), max_size_(max_size) {
@@ -73,6 +71,4 @@
it->second = entries_.begin();
}
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator_cache.h b/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator_cache.h
index 7318b5c..b8e7cd8 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator_cache.h
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator_cache.h
@@ -24,9 +24,7 @@
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
/// Implementation of a fixed size LRU cache. That is, when the number of
/// elements reaches a certain threshold, the element that wasn't used for the
@@ -92,8 +90,6 @@
const size_t max_size_;
};
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_SPIRV_TOOLS_FUZZER_MUTATOR_CACHE_H_
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/override_cli_params.h b/src/tint/fuzzers/tint_spirv_tools_fuzzer/override_cli_params.h
index 2aa2086..da05a4d 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/override_cli_params.h
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/override_cli_params.h
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
/// @brief Allows CLI parameters to be overridden.
///
@@ -29,8 +27,6 @@
/// @param cli_params - the parsed CLI parameters to be updated.
void OverrideCliParams(FuzzerCliParams& cli_params);
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_SPIRV_TOOLS_FUZZER_OVERRIDE_CLI_PARAMS_H_
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc
index 05fd2a3..ea2f89e 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc
@@ -20,9 +20,7 @@
#include "source/opt/build_module.h"
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/util.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
SpirvFuzzMutator::SpirvFuzzMutator(
spv_target_env target_env,
@@ -122,6 +120,4 @@
}
}
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.h b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.h
index 073662e..1db79f4 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.h
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.h
@@ -26,9 +26,7 @@
#include "source/fuzz/protobufs/spirvfuzz_protobufs.h"
#include "source/fuzz/pseudo_random_generator.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
/// The mutator that uses spirv-fuzz to mutate SPIR-V.
///
@@ -88,8 +86,6 @@
const uint32_t seed_;
};
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_SPIRV_TOOLS_FUZZER_SPIRV_FUZZ_MUTATOR_H_
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_opt_mutator.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_opt_mutator.cc
index 4e17ad0..0c375aa 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_opt_mutator.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_opt_mutator.cc
@@ -22,9 +22,7 @@
#include "spirv-tools/optimizer.hpp"
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/util.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
SpirvOptMutator::SpirvOptMutator(spv_target_env target_env,
uint32_t seed,
@@ -154,6 +152,4 @@
}
}
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_opt_mutator.h b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_opt_mutator.h
index 6c209cd..bb2c047 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_opt_mutator.h
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_opt_mutator.h
@@ -23,9 +23,7 @@
#include "src/tint/fuzzers/random_generator.h"
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/mutator.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
/// Mutates the SPIR-V module using the spirv-opt tool.
///
@@ -89,8 +87,6 @@
RandomGenerator generator_;
};
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_SPIRV_TOOLS_FUZZER_SPIRV_OPT_MUTATOR_H_
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_reduce_mutator.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_reduce_mutator.cc
index 93d2e8b..07b3e9e 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_reduce_mutator.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_reduce_mutator.cc
@@ -32,9 +32,7 @@
#include "source/reduce/structured_loop_to_selection_reduction_opportunity_finder.h"
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/util.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
SpirvReduceMutator::SpirvReduceMutator(spv_target_env target_env,
std::vector<uint32_t> binary,
@@ -185,6 +183,4 @@
}
}
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_reduce_mutator.h b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_reduce_mutator.h
index 9699b01..fc36701 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_reduce_mutator.h
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/spirv_reduce_mutator.h
@@ -26,9 +26,7 @@
#include "source/reduce/reduction_opportunity_finder.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
/// Mutates SPIR-V binary by running spirv-reduce tool.
///
@@ -125,8 +123,6 @@
const uint32_t seed_;
};
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
#endif // SRC_TINT_FUZZERS_TINT_SPIRV_TOOLS_FUZZER_SPIRV_REDUCE_MUTATOR_H_
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_fuzzer.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_fuzzer.cc
index 8c14547..7958634 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_fuzzer.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_fuzzer.cc
@@ -17,14 +17,10 @@
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
void OverrideCliParams(FuzzerCliParams& /*unused*/) {
// Leave the CLI parameters unchanged.
}
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_hlsl_writer_fuzzer.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_hlsl_writer_fuzzer.cc
index 08111d9..58a7fab 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_hlsl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_hlsl_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
void OverrideCliParams(FuzzerCliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kHlsl;
}
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_msl_writer_fuzzer.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_msl_writer_fuzzer.cc
index 86a493e..69edf44 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_msl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_msl_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
void OverrideCliParams(FuzzerCliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kMsl;
}
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_spv_writer_fuzzer.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_spv_writer_fuzzer.cc
index 2cbfef7..2e583c7 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_spv_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_spv_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
void OverrideCliParams(FuzzerCliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kSpv;
}
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_wgsl_writer_fuzzer.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_wgsl_writer_fuzzer.cc
index 4538973..a25dff3 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_wgsl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/tint_spirv_tools_wgsl_writer_fuzzer.cc
@@ -17,9 +17,7 @@
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/cli.h"
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/override_cli_params.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
+namespace tint::fuzzers::spvtools_fuzzer {
void OverrideCliParams(FuzzerCliParams& cli_params) {
assert(cli_params.fuzzing_target == FuzzingTarget::kAll &&
@@ -28,6 +26,4 @@
cli_params.fuzzing_target = FuzzingTarget::kWgsl;
}
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/util.cc b/src/tint/fuzzers/tint_spirv_tools_fuzzer/util.cc
index a20a1f4..1117821 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/util.cc
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/util.cc
@@ -17,10 +17,7 @@
#include "src/tint/fuzzers/tint_spirv_tools_fuzzer/util.h"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
-namespace util {
+namespace tint::fuzzers::spvtools_fuzzer::util {
namespace {
bool WriteBinary(const std::string& path, const uint8_t* data, size_t size) {
@@ -151,7 +148,4 @@
binary.size() * sizeof(uint32_t));
}
-} // namespace util
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer::util
diff --git a/src/tint/fuzzers/tint_spirv_tools_fuzzer/util.h b/src/tint/fuzzers/tint_spirv_tools_fuzzer/util.h
index 301e3ba..28b1774 100644
--- a/src/tint/fuzzers/tint_spirv_tools_fuzzer/util.h
+++ b/src/tint/fuzzers/tint_spirv_tools_fuzzer/util.h
@@ -24,10 +24,7 @@
#include "spirv-tools/libspirv.hpp"
-namespace tint {
-namespace fuzzers {
-namespace spvtools_fuzzer {
-namespace util {
+namespace tint::fuzzers::spvtools_fuzzer::util {
/// @param buffer will be used to output errors by the returned message
/// consumer. Must remain in scope as long as the returned consumer is in
@@ -88,9 +85,6 @@
/// @return whether the operation was successful.
bool WriteBinary(const std::string& path, const std::vector<uint32_t>& binary);
-} // namespace util
-} // namespace spvtools_fuzzer
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers::spvtools_fuzzer::util
#endif // SRC_TINT_FUZZERS_TINT_SPIRV_TOOLS_FUZZER_UTIL_H_
diff --git a/src/tint/fuzzers/tint_spv_reader_fuzzer.cc b/src/tint/fuzzers/tint_spv_reader_fuzzer.cc
index 0daab5d..3d8bdd4 100644
--- a/src/tint/fuzzers/tint_spv_reader_fuzzer.cc
+++ b/src/tint/fuzzers/tint_spv_reader_fuzzer.cc
@@ -17,8 +17,7 @@
#include "src/tint/fuzzers/fuzzer_init.h"
#include "src/tint/fuzzers/tint_common_fuzzer.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
tint::fuzzers::CommonFuzzer fuzzer(InputFormat::kSpv, OutputFormat::kNone);
@@ -26,5 +25,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_spv_reader_hlsl_writer_fuzzer.cc b/src/tint/fuzzers/tint_spv_reader_hlsl_writer_fuzzer.cc
index 5f2f2c7..8e84e5d 100644
--- a/src/tint/fuzzers/tint_spv_reader_hlsl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_spv_reader_hlsl_writer_fuzzer.cc
@@ -17,8 +17,7 @@
#include "src/tint/fuzzers/fuzzer_init.h"
#include "src/tint/fuzzers/tint_reader_writer_fuzzer.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
tint::fuzzers::ReaderWriterFuzzer fuzzer(InputFormat::kSpv,
@@ -29,5 +28,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_spv_reader_msl_writer_fuzzer.cc b/src/tint/fuzzers/tint_spv_reader_msl_writer_fuzzer.cc
index 0b1446b..0bc7c85 100644
--- a/src/tint/fuzzers/tint_spv_reader_msl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_spv_reader_msl_writer_fuzzer.cc
@@ -17,8 +17,7 @@
#include "src/tint/fuzzers/fuzzer_init.h"
#include "src/tint/fuzzers/tint_reader_writer_fuzzer.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
DataBuilder db(data, size);
@@ -33,5 +32,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_spv_reader_spv_writer_fuzzer.cc b/src/tint/fuzzers/tint_spv_reader_spv_writer_fuzzer.cc
index b3cc6b0..c95034a 100644
--- a/src/tint/fuzzers/tint_spv_reader_spv_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_spv_reader_spv_writer_fuzzer.cc
@@ -17,8 +17,7 @@
#include "src/tint/fuzzers/fuzzer_init.h"
#include "src/tint/fuzzers/tint_reader_writer_fuzzer.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
DataBuilder db(data, size);
@@ -33,5 +32,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_spv_reader_wgsl_writer_fuzzer.cc b/src/tint/fuzzers/tint_spv_reader_wgsl_writer_fuzzer.cc
index eff349d..579b89c 100644
--- a/src/tint/fuzzers/tint_spv_reader_wgsl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_spv_reader_wgsl_writer_fuzzer.cc
@@ -17,8 +17,7 @@
#include "src/tint/fuzzers/fuzzer_init.h"
#include "src/tint/fuzzers/tint_reader_writer_fuzzer.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
tint::fuzzers::ReaderWriterFuzzer fuzzer(InputFormat::kSpv,
@@ -29,5 +28,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_vertex_pulling_fuzzer.cc b/src/tint/fuzzers/tint_vertex_pulling_fuzzer.cc
index e1ad99e..9184710 100644
--- a/src/tint/fuzzers/tint_vertex_pulling_fuzzer.cc
+++ b/src/tint/fuzzers/tint_vertex_pulling_fuzzer.cc
@@ -16,8 +16,7 @@
#include "src/tint/fuzzers/tint_common_fuzzer.h"
#include "src/tint/fuzzers/transform_builder.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
TransformBuilder tb(data, size);
@@ -31,5 +30,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_wgsl_reader_fuzzer.cc b/src/tint/fuzzers/tint_wgsl_reader_fuzzer.cc
index d1b1f27..2e64c36 100644
--- a/src/tint/fuzzers/tint_wgsl_reader_fuzzer.cc
+++ b/src/tint/fuzzers/tint_wgsl_reader_fuzzer.cc
@@ -17,8 +17,7 @@
#include "src/tint/fuzzers/fuzzer_init.h"
#include "src/tint/fuzzers/tint_common_fuzzer.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
tint::fuzzers::CommonFuzzer fuzzer(InputFormat::kWGSL, OutputFormat::kNone);
@@ -26,5 +25,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_wgsl_reader_hlsl_writer_fuzzer.cc b/src/tint/fuzzers/tint_wgsl_reader_hlsl_writer_fuzzer.cc
index d5a15a7..1fc85b7 100644
--- a/src/tint/fuzzers/tint_wgsl_reader_hlsl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_wgsl_reader_hlsl_writer_fuzzer.cc
@@ -17,8 +17,7 @@
#include "src/tint/fuzzers/fuzzer_init.h"
#include "src/tint/fuzzers/tint_reader_writer_fuzzer.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
tint::fuzzers::ReaderWriterFuzzer fuzzer(InputFormat::kWGSL,
@@ -29,5 +28,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_wgsl_reader_msl_writer_fuzzer.cc b/src/tint/fuzzers/tint_wgsl_reader_msl_writer_fuzzer.cc
index 58fdf8b..85d9e3d 100644
--- a/src/tint/fuzzers/tint_wgsl_reader_msl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_wgsl_reader_msl_writer_fuzzer.cc
@@ -17,8 +17,7 @@
#include "src/tint/fuzzers/fuzzer_init.h"
#include "src/tint/fuzzers/tint_reader_writer_fuzzer.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
DataBuilder db(data, size);
@@ -33,5 +32,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_wgsl_reader_spv_writer_fuzzer.cc b/src/tint/fuzzers/tint_wgsl_reader_spv_writer_fuzzer.cc
index f4932dd..9a31dd5 100644
--- a/src/tint/fuzzers/tint_wgsl_reader_spv_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_wgsl_reader_spv_writer_fuzzer.cc
@@ -17,8 +17,7 @@
#include "src/tint/fuzzers/fuzzer_init.h"
#include "src/tint/fuzzers/tint_reader_writer_fuzzer.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
DataBuilder db(data, size);
@@ -33,5 +32,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/tint_wgsl_reader_wgsl_writer_fuzzer.cc b/src/tint/fuzzers/tint_wgsl_reader_wgsl_writer_fuzzer.cc
index 8cb7eaa..33a0579 100644
--- a/src/tint/fuzzers/tint_wgsl_reader_wgsl_writer_fuzzer.cc
+++ b/src/tint/fuzzers/tint_wgsl_reader_wgsl_writer_fuzzer.cc
@@ -17,8 +17,7 @@
#include "src/tint/fuzzers/fuzzer_init.h"
#include "src/tint/fuzzers/tint_reader_writer_fuzzer.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
tint::fuzzers::ReaderWriterFuzzer fuzzer(InputFormat::kWGSL,
@@ -29,5 +28,4 @@
return fuzzer.Run(data, size);
}
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
diff --git a/src/tint/fuzzers/transform_builder.h b/src/tint/fuzzers/transform_builder.h
index 7c5073d..ff64e5a 100644
--- a/src/tint/fuzzers/transform_builder.h
+++ b/src/tint/fuzzers/transform_builder.h
@@ -23,8 +23,7 @@
#include "src/tint/fuzzers/data_builder.h"
#include "src/tint/fuzzers/shuffle_transform.h"
-namespace tint {
-namespace fuzzers {
+namespace tint::fuzzers {
/// Fuzzer utility class to build inputs for transforms and setup the transform
/// manager.
@@ -222,7 +221,6 @@
};
}; // class TransformBuilder
-} // namespace fuzzers
-} // namespace tint
+} // namespace tint::fuzzers
#endif // SRC_TINT_FUZZERS_TRANSFORM_BUILDER_H_