Commit 497b2eb
authored
[clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (#70360)
This patch addresses some examples of bad formatting in Clang. The following commit contains only changes suggested by clang-format: 21689b5.
I believe it's a net negative on readability, with a couple of particularly bad cases. Highlights:
```diff
- [[clang::preferred_type(bool)]]
- mutable unsigned CachedLocalOrUnnamed : 1;
+ [[clang::preferred_type(bool)]] mutable unsigned CachedLocalOrUnnamed : 1;
```
```diff
- [[clang::preferred_type(TypeDependence)]]
- unsigned Dependence : llvm::BitWidth<TypeDependence>;
+ [[clang::preferred_type(TypeDependence)]] unsigned Dependence
+ : llvm::BitWidth<TypeDependence>;
```
```diff
- [[clang::preferred_type(ExceptionSpecificationType)]]
- unsigned ExceptionSpecType : 4;
+ [[clang::preferred_type(
+ ExceptionSpecificationType)]] unsigned ExceptionSpecType : 4;
```
Style guides doesn't appear to have an opinion on this matter.1 parent 39b9395 commit 497b2eb
File tree
3 files changed
+6
-5
lines changed- clang
- docs
- lib/Format
- unittests/Format
3 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| 823 | + | |
823 | 824 | | |
824 | 825 | | |
825 | 826 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1476 | 1476 | | |
1477 | 1477 | | |
1478 | 1478 | | |
1479 | | - | |
| 1479 | + | |
1480 | 1480 | | |
1481 | 1481 | | |
1482 | 1482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26179 | 26179 | | |
26180 | 26180 | | |
26181 | 26181 | | |
26182 | | - | |
26183 | 26182 | | |
26184 | 26183 | | |
26185 | 26184 | | |
| |||
26194 | 26193 | | |
26195 | 26194 | | |
26196 | 26195 | | |
| 26196 | + | |
| 26197 | + | |
| 26198 | + | |
| 26199 | + | |
26197 | 26200 | | |
26198 | 26201 | | |
26199 | 26202 | | |
| |||
26206 | 26209 | | |
26207 | 26210 | | |
26208 | 26211 | | |
26209 | | - | |
26210 | | - | |
26211 | | - | |
26212 | 26212 | | |
26213 | 26213 | | |
26214 | 26214 | | |
| |||
0 commit comments