This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Parse double-square attributes as pointer qualifiers
ClosedPublic

Authored by arichardson on Aug 27 2020, 8:47 AM.

Details

Summary

Before: x = (foo *[[clang::attr]]) * v;
After: x = (foo *[[clang::attr]])*v;

Diff Detail

Event Timeline

arichardson created this revision.Aug 27 2020, 8:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2020, 8:47 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
arichardson requested review of this revision.Aug 27 2020, 8:47 AM

drop unnecesssary const

arichardson edited the summary of this revision. (Show Details)Aug 28 2020, 3:33 AM
aaron.ballman added inline comments.Aug 28 2020, 7:19 AM
clang/unittests/Format/FormatTest.cpp
8071

Can you also add a test case for an attribute with an argument list, e.g.,

MACRO(A *[[clang::attr("foobar")]] a);
8141

Same for the casting case.

add test case with argument

arichardson marked 2 inline comments as done.Sep 1 2020, 3:28 AM
This revision is now accepted and ready to land.Sep 1 2020, 11:09 AM