[PATCH] D120774: [clang-format] Handle builtins in constraint expression
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 3 04:48:23 PST 2022
owenpan 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"
----------------
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,
...
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120774/new/
https://reviews.llvm.org/D120774
More information about the cfe-commits
mailing list