[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

Alexander Richardson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 1 10:10:42 PDT 2020


arichardson created this revision.
arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius.
Herald added subscribers: cfe-commits, jfb.
Herald added a project: clang.
arichardson requested review of this revision.

Before: _Atomic(uint64_t) * a;
After: _Atomic(uint64_t) *a;

This treats _Atomic the same as the the TypenameMacros and decltype. It
also allows some cleanup by removing checks whether the token before a
paren is kw_decltype and instead checking for TT_TypeDeclarationParen.
While touching this code also extend the decltype test cases to also check
for typeof() and _Atomic(T).

Depends on D86950 <https://reviews.llvm.org/D86950>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86959

Files:
  clang/lib/Format/FormatToken.cpp
  clang/lib/Format/FormatToken.h
  clang/lib/Format/TokenAnnotator.cpp
  clang/unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86959.289208.patch
Type: text/x-patch
Size: 16674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200901/d92ec010/attachment-0001.bin>


More information about the cfe-commits mailing list