[PATCH] D86711: [clang-format] Parse __attribute((foo)) as a pointer qualifier
Alexander Richardson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 28 02:57:37 PDT 2020
arichardson marked 2 inline comments as done.
arichardson added inline comments.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:1895
tok::kw_restrict, tok::kw_volatile,
- tok::kw_noexcept) ||
+ tok::kw___attribute, tok::kw_noexcept) ||
(NextToken->is(tok::l_brace) && !NextToken->getNextNonComment()))
----------------
aaron.ballman wrote:
> arichardson wrote:
> > arichardson wrote:
> > > aaron.ballman wrote:
> > > > What about other attributes than GNU-style ones, like `[[clang::address_space(0)]]`?
> > > I guess those should also be handled. I can try to do that in a follow-up change.
> > It appears that they are already handled for this case. I've handled them in cast expressions in D86721.
> Ah, thank you for the update! Can you add a test case for that, as I don't see one in the current tests?
I added the test to D86721 since this change handles __attribute__ and that one deals with [[attr]]
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86711/new/
https://reviews.llvm.org/D86711
More information about the cfe-commits
mailing list