Before: void f() { MACRO(A * restrict a); }
After: void f() { MACRO(A *restrict a); }
Also check that the restrict and restrict__ aliases are handled.
Paths
| Differential D86710
[clang-format] Parse restrict as a pointer qualifier ClosedPublic Authored by arichardson on Aug 27 2020, 6:46 AM.
Details Summary Before: void f() { MACRO(A * restrict a); } Also check that the restrict and restrict__ aliases are handled.
Diff Detail
Event Timelinearichardson added a parent revision: D86708: [clang-format] Parse volatile as a pointer qualifier.Aug 27 2020, 8:15 AM arichardson added a child revision: D86711: [clang-format] Parse __attribute((foo)) as a pointer qualifier. Comment Actions LGTM, assuming tests pass (automated checks failed to resolve your patch since you based it off of your other one). Looks like enabling C99 should have no other effects, right? This revision is now accepted and ready to land.Aug 27 2020, 8:15 AM Comment Actions
Tests are passing locally. Looking at TokenKinds.def it seems the only thing setting C99 enables is restrict and inline (but we already get that via C++). This revision was landed with ongoing or failed builds.Aug 28 2020, 3:32 AM Closed by commit rG4f103695646b: [clang-format] Parse restrict as a pointer qualifier (authored by arichardson). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 288313 clang/lib/Format/Format.cpp
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp
|