[clang] [clang-tools-extra] [llvm] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 28 19:16:01 PDT 2025
================
@@ -2249,6 +2283,9 @@ ExprResult Parser::ParseUnaryExprOrTypeTraitExpression() {
else if (getLangOpts().C2y && OpTok.is(tok::kw__Countof))
Diag(OpTok, diag::warn_c2y_compat_keyword) << OpTok.getName();
+ if (OpTok.is(tok::caretcaret))
+ return ParseCXXReflectExpression(OpTok.getLocation());
----------------
Sirraide wrote:
I don’t think we need to involve `ParseUnaryExprOrTypeTraitExpr()` in this (this function is primarily for expressions of the form `<something> ( <expr> )`); is there any reason we can’t just call `ParseCXXReflectExpression()` in `ParseCastExpression()`?
https://github.com/llvm/llvm-project/pull/164692
More information about the cfe-commits
mailing list