[clang] [clang][NFC] move traits to tablegen (PR #201491)
Matthias Wippich via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 23 08:22:46 PDT 2026
================
@@ -1241,7 +1241,7 @@ DeclSpec::TST Parser::TypeTransformTokToDeclSpec() {
#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) \
case tok::kw___##Trait: \
return DeclSpec::TST_##Trait;
-#include "clang/Basic/TransformTypeTraits.def"
+#include "clang/Basic/Traits.inc"
----------------
Tsche wrote:
I prefer `Traits.inc` since this also includes expression traits. I don't think it makes sense to maintain expression traits separately from type traits.
Likewise, I was going to fold Basic/ExpressionTraits.{h,cpp} and Basic/TypeTraits.{h,cpp} into Basic/Traits.{h,cpp} in a follow-up PR since they contribute overloads to the exact same utilities (`getTraitName`, `getTraitSpelling` along with the enums).
https://github.com/llvm/llvm-project/pull/201491
More information about the cfe-commits
mailing list