diff options
author | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2020-09-01 18:09:07 +0100 |
---|---|---|
committer | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2020-09-07 10:09:18 +0100 |
commit | 56fa7d1dc6a8d23111ff84171036f333cf9cddf2 (patch) | |
tree | 030571cff4be24f6a3ab7276c0e239320a264015 /clang/lib/Format/FormatToken.cpp | |
parent | cd01eec14bc045a8616604cadf94dba025090ba5 (diff) | |
download | llvm-56fa7d1dc6a8d23111ff84171036f333cf9cddf2.zip llvm-56fa7d1dc6a8d23111ff84171036f333cf9cddf2.tar.gz llvm-56fa7d1dc6a8d23111ff84171036f333cf9cddf2.tar.bz2 |
[clang-format] Fix formatting of _Atomic() qualifier
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).
Reviewed By: MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D86959
Diffstat (limited to 'clang/lib/Format/FormatToken.cpp')
-rw-r--r-- | clang/lib/Format/FormatToken.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/FormatToken.cpp b/clang/lib/Format/FormatToken.cpp index 4bc865b..8e4994f 100644 --- a/clang/lib/Format/FormatToken.cpp +++ b/clang/lib/Format/FormatToken.cpp @@ -62,6 +62,7 @@ bool FormatToken::isSimpleTypeSpecifier() const { case tok::kw_char32_t: case tok::kw_typeof: case tok::kw_decltype: + case tok::kw__Atomic: return true; default: return false; |