diff options
author | mydeveloperday <mydeveloperday@gmail.com> | 2020-05-07 21:57:14 +0100 |
---|---|---|
committer | mydeveloperday <mydeveloperday@gmail.com> | 2020-05-07 22:00:04 +0100 |
commit | 5a4ddbd69db2b0e09398214510501d0e59a0c30b (patch) | |
tree | 3a3fd1474b87500c04170e64d55040e56c06178e /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 6227f021ad400cc604ca2d15d3639eabfd66a2d9 (diff) | |
download | llvm-5a4ddbd69db2b0e09398214510501d0e59a0c30b.zip llvm-5a4ddbd69db2b0e09398214510501d0e59a0c30b.tar.gz llvm-5a4ddbd69db2b0e09398214510501d0e59a0c30b.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions