[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 26 22:28:25 PDT 2023


Endilll wrote:

[Mozilla](https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html), [WebKit](https://webkit.org/code-style-guidelines/), [GCC](https://gcc.gnu.org/codingconventions.html#Cxx_Conventions), [Microsoft](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions), and [Chromium](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md) doesn't appear to be opinionated on attributes at all.

[Google](https://google.github.io/styleguide/cppguide.html) is the only one mentioning attributes at all:
> Attributes, and macros that expand to attributes, appear at the very beginning of the function declaration or definition, before the return type:
>```cpp
>  ABSL_ATTRIBUTE_NOINLINE void ExpensiveFunction();
>  [[nodiscard]] bool IsOk();
>```

I'm not sure which `BreakAfterAttributes` option this boils down to, but I don't mind setting it back to `Never` for Google style if reviewers would like me to do so.

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


More information about the cfe-commits mailing list