[PATCH] D145262: [clang-format] Treat AttributeMacros more like attribute macros
Jared Grubb via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 12 16:59:54 PDT 2023
jaredgrubb added inline comments.
================
Comment at: clang/unittests/Format/FormatTestObjC.cpp:1619
+ // Reflow after first macro.
+ // FIXME: these should indent but don't.
+ verifyFormat("- (id)init ATTRIBUTE_MACRO(X)\n"
----------------
I don't love this FIXME, but I was afraid to add more to this patch, as fixing this will require digging into things that have nothing to do with `__attribute__` vs `AttributeMacros`.
For example, suffix macros in C/C++ also are broken in the same way with just plain `__attribute__`. For example, for `ColumnWidth: 50`:
```
int f(double) __attribute__((overloadable))
__attribute__((overloadable));
int ffffffffffffffffffffffffffffff(double)
__attribute__((overloadable))
__attribute__((overloadable));
```
I think fixing reflowing of suffix macros is best done in another PR (which I can take a stab at!)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145262/new/
https://reviews.llvm.org/D145262
More information about the cfe-commits
mailing list