[PATCH] D120774: [clang-format] Handle builtins in constraint expression
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 7 04:35:26 PST 2022
HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3090-3093
+#define TYPE_TRAIT(N, I, K) case tok::kw_##I:
+#define ARRAY_TYPE_TRAIT(I, E, K) case tok::kw_##I:
+#define EXPRESSION_TRAIT(I, E, K) case tok::kw_##I:
+#include "clang/Basic/TokenKinds.def"
----------------
owenpan wrote:
> Instead, you can fold `case tok::identifier:` below into `default:` like this:
> ```
> default:
> if (!FormatTok->Tok.getIdentifierInfo())
> return;
>
> // We need to differentiate identifiers for a template deduction guide,
> ...
> ```
Thanks.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120774/new/
https://reviews.llvm.org/D120774
More information about the cfe-commits
mailing list