From d654aceea23ded941d538a1582c1c34a8aebc49f Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Wed, 29 Jan 2025 15:30:47 -0800 Subject: [PATCH] Bump clang-format version to v19 (#291) This patch bumps the clang-format that we are using to v19 to fix some issues that came up in #288. --- .github/workflows/main.yaml | 4 ++-- gematria/basic_block/basic_block.h | 2 +- gematria/datasets/exegesis_benchmark_lib_test.cc | 2 +- gematria/datasets/process_and_filter_bbs_lib_test.cc | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 55f65e35..c0cf2626 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -48,9 +48,9 @@ jobs: steps: - uses: actions/checkout@v4 - name: Check c++ formatting - uses: jidicula/clang-format-action@v4.11.0 + uses: jidicula/clang-format-action@v4.14.0 with: - clang-format-version: '18' + clang-format-version: '19' check-path: 'src' check-bazel-formatting: name: Bazel Formatting Check diff --git a/gematria/basic_block/basic_block.h b/gematria/basic_block/basic_block.h index 43579fb7..db549a03 100644 --- a/gematria/basic_block/basic_block.h +++ b/gematria/basic_block/basic_block.h @@ -221,7 +221,7 @@ std::ostream& operator<<(std::ostream& os, const InstructionOperand& operand); // Represents an annotation holding a value such as some measure/statistic // paired with the instruction. struct Annotation { - Annotation() : value(-1){}; + Annotation() : value(-1) {}; // Initializes all fields of the annotation. Annotation(std::string name, double value); diff --git a/gematria/datasets/exegesis_benchmark_lib_test.cc b/gematria/datasets/exegesis_benchmark_lib_test.cc index 7fe52a1f..cf215195 100644 --- a/gematria/datasets/exegesis_benchmark_lib_test.cc +++ b/gematria/datasets/exegesis_benchmark_lib_test.cc @@ -51,7 +51,7 @@ class ExegesisBenchmarkTest : public testing::Test { std::unique_ptr Benchmark; protected: - ExegesisBenchmarkTest() : Benchmark(cantFail(ExegesisBenchmark::create())){}; + ExegesisBenchmarkTest() : Benchmark(cantFail(ExegesisBenchmark::create())) {}; static void SetUpTestSuite() { // LLVM Setup diff --git a/gematria/datasets/process_and_filter_bbs_lib_test.cc b/gematria/datasets/process_and_filter_bbs_lib_test.cc index 8420eed1..48fc395d 100644 --- a/gematria/datasets/process_and_filter_bbs_lib_test.cc +++ b/gematria/datasets/process_and_filter_bbs_lib_test.cc @@ -53,7 +53,7 @@ class ProcessFilterBBsTest : public testing::Test { : LLVMArchSupport(LlvmArchitectureSupport::X86_64()), LLVMInstPrinter(LLVMArchSupport->CreateMCInstPrinter( InlineAsm::AsmDialect::AD_ATT)), - BBProcessor(){}; + BBProcessor() {}; std::vector removeRiskyInstructions( std::string_view TextualAssembly, bool FilterMemoryAccessingBlocks) {