[clang-format] [PR45639] clang-format splits up the brackets of C++17...
[clang-format] [PR45639] clang-format splits up the brackets of C++17 attribute [[ ]] when used with the first parameter Summary: https://bugs.llvm.org/show_bug.cgi?id=45639 clang-format incorrectly splits the `[[` in a long argument list ``` void SomeLongClassName::ALongMethodNameInThatClass([[maybe_unused]] const shared_ptr<ALongTypeName>& argumentNameForThat LongType) { } ``` becomes ``` void SomeLongClassName::ALongMethodNameInThatClass([ [maybe_unused]] const shared_ptr<ALongTypeName> &argumentNameForThatLongType) { } ``` leaving one `[` on the previous line For a function with just 1 very long argument, clang-format chooses to split between the `[[`, This revision prevents the slip between the two `[` and the second `[` Reviewed By: krasimir Subscribers: cfe-commits Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D79401
Loading
Please sign in to comment