[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)
Daniel M. Katz via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 22 14:07:05 PDT 2025
================
@@ -5493,6 +5493,55 @@ class BuiltinBitCastExpr final
}
};
+/// Represents a C++2c reflect expression (P2996).
+class CXXReflectExpr : public Expr {
+
+ // Source locations.
+ SourceLocation OperatorLoc;
+ SourceRange OperandRange;
+
+ CXXReflectExpr(const ASTContext &C, QualType T, QualType Ty);
+ CXXReflectExpr(const ASTContext &C, QualType T, Decl *Arg, bool IsNamespace);
----------------
katzdm wrote:
Why is `IsNamespace` explicitly needed? Can we check `isa<NamespaceDecl>(Arg)` (or `isa<TranslationUnitDecl>(Arg)`) from within the constructor?
https://github.com/llvm/llvm-project/pull/164692
More information about the cfe-commits
mailing list