[compiler-rt] [scudo] Refactor allocator config to support optional flags (PR #81805)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 12:35:16 PST 2024


ChiaHungDuan wrote:

> ⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️
> 
> You can test this locally with the following command:
> ```shell
> git-clang-format --diff 2c5a0d392592982bb9c73cbc10c64390b9045873 2a262143106ae2011f8c8db561ba821e35c81188 -- compiler-rt/lib/scudo/standalone/allocator_config_wrapper.h compiler-rt/lib/scudo/standalone/allocator_config.h compiler-rt/lib/scudo/standalone/combined.h compiler-rt/lib/scudo/standalone/condition_variable.h compiler-rt/lib/scudo/standalone/memtag.h compiler-rt/lib/scudo/standalone/primary32.h compiler-rt/lib/scudo/standalone/primary64.h compiler-rt/lib/scudo/standalone/secondary.h compiler-rt/lib/scudo/standalone/tests/combined_test.cpp compiler-rt/lib/scudo/standalone/tests/primary_test.cpp compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp
> ```
> 
> View the diff from clang-format here.
> ```diff
> diff --git a/compiler-rt/lib/scudo/standalone/allocator_config_wrapper.h b/compiler-rt/lib/scudo/standalone/allocator_config_wrapper.h
> index dfae3e0135..da57ec7ac8 100644
> --- a/compiler-rt/lib/scudo/standalone/allocator_config_wrapper.h
> +++ b/compiler-rt/lib/scudo/standalone/allocator_config_wrapper.h
> @@ -119,7 +119,7 @@ template <typename AllocatorConfig> struct SecondaryConfig {
>    }
>  #include "allocator_config.def"
>    }; // CacheConfig
> -}; // SecondaryConfig
> +};   // SecondaryConfig
>  
>  #undef OPTIONAL_TEMPLATE
>  #undef OPTIONAL_TEMPLATE_TYPE
> ```

There seems to be an update in the style. The clang-format on my machine reports this style as an error. I'll fix this later after rebase

https://github.com/llvm/llvm-project/pull/81805


More information about the llvm-commits mailing list