[clang] [clang]: support std::meta::info for primitive types (PR #190356)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 4 08:07:00 PDT 2026
================
@@ -13102,7 +13102,10 @@ StmtResult TreeTransform<Derived>::TransformUnresolvedSYCLKernelCallStmt(
template <typename Derived>
ExprResult TreeTransform<Derived>::TransformCXXReflectExpr(CXXReflectExpr *E) {
// TODO(reflection): Implement its transform
- assert(false && "not implemented yet");
+ if (!E->isTypeDependent())
+ return E;
----------------
Sirraide wrote:
This isn’t quite right: `E` itself should never be type-dependent because its type is _always_ `std::meta::info`; I think you meant to check if the contained type (if it is one) is type-dependent, but that wouldn’t be correct either I believe because it might still be instantiation-dependent.
I’d suggest either leaving this function unchanged for now if we don’t want to support templates yet, or alternatively, implement it properly, i.e. `switch` on the reflection kind and call `TransformType()` if it is a type (which should be at most like 10 LOC).
https://github.com/llvm/llvm-project/pull/190356
More information about the cfe-commits
mailing list