Before: void f() { MACRO(A * attribute((foo)) a); }
After: void f() { MACRO(A *attribute((foo)) a); }
Also check that the attribute alias is handled.
Paths
| Differential D86711
[clang-format] Parse __attribute((foo)) as a pointer qualifier ClosedPublic Authored by arichardson on Aug 27 2020, 6:51 AM.
Details Summary Before: void f() { MACRO(A * attribute((foo)) a); } Also check that the attribute alias is handled.
Diff Detail
Event Timelineaaron.ballman added inline comments.
arichardson added a parent revision: D86710: [clang-format] Parse restrict as a pointer qualifier.Aug 27 2020, 8:15 AM arichardson added a child revision: D86713: [clang-format] Parse nullability attributes as a pointer qualifier.
arichardson added inline comments. This revision is now accepted and ready to land.Aug 28 2020, 2:58 AM This revision was landed with ongoing or failed builds.Aug 28 2020, 3:32 AM Closed by commit rG37cdabdb82e3: [clang-format] Parse __attribute((foo)) as a pointer qualifier (authored by arichardson). · Explain Why This revision was automatically updated to reflect the committed changes. arichardson marked an inline comment as done.
Revision Contents
Diff 288573 clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp
|
What about other attributes than GNU-style ones, like [[clang::address_space(0)]]?