https://bugs.llvm.org/show_bug.cgi?id=45639
Bug ID: 45639
Summary: clang-format splits up the brackets of C++17 attribute
[[ ]] with PenaltyExcessCharacter
Product: clang
Version: 10.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
I've tried to simplify this down as much as I can:
test.cpp:
```
void SomeLongClassName::ALongMethodNameInThatClass([[maybe_unused]] const
shared_ptr<ALongTypeName>& argumentNameForThat
LongType) {
}
```
.clang-format:
```
Standard: c++17
PenaltyExcessCharacter: 10
```
clang-format.exe -style=file test.cpp:
```
void SomeLongClassName::ALongMethodNameInThatClass([
[maybe_unused]] const shared_ptr<ALongTypeName>
&argumentNameForThatLongType) {
}
```
Note how the first [ of [[maybe_unused]] separated from the rest. I would
expect the entirety of [[maybe_unused]] to be together.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs