[PATCH] D86713: [clang-format] Parse nullability attributes as a pointer qualifier

Jake Merdich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 27 08:57:05 PDT 2020


JakeMerdichAMD added a comment.

In D86713#2242300 <https://reviews.llvm.org/D86713#2242300>, @arichardson wrote:

> In D86713#2242253 <https://reviews.llvm.org/D86713#2242253>, @JakeMerdichAMD wrote:
>
>> LGTM, again assuming tests pass locally (patch did not resolve).
>>
>> Out of curiosity, is _Atomic on your radar? I found some code in clang proper that handled restrict and _Atomic together. C/C++ have way too many qualifiers...
>
> I have not looked at _Atomic yet and it's probably low priority for me unless it's a trivial change.
> My main motivation with these changes is to format a `__capability` pointer qualifier correctly (an extension that we add for our out-of-tree CHERI C/C++ dialect).

I don't know of anyone who uses it yet, so just adding it for posterity, definitely not a blocker. Were you planning on handling `__capability` directly or in a user-configurable option? I can imagine other ad-hoc pointer qualifiers specific to static analysis tools or as properly-ifdef'd aliases of `__attribute__(...)`, so an option might be useful.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86713/new/

https://reviews.llvm.org/D86713



More information about the cfe-commits mailing list