[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:06 PDT 2025
================
@@ -50,6 +50,13 @@ ExprResult Parser::ParseCXXReflectExpression(SourceLocation OpLoc) {
return ExprError();
TypeSourceInfo *TSI = nullptr;
+ QualType QT = Actions.GetTypeFromParser(TR.get(), &TSI);
+
+ if (QT.isNull())
+ return ExprError();
+
+ if (!TSI)
+ TSI = Actions.getASTContext().getTrivialTypeSourceInfo(QT, /*Loc=*/OpLoc);
----------------
katzdm wrote:
I think `OpLoc` is the location of `^^`, right? Can we use the location of the type's name instead?
https://github.com/llvm/llvm-project/pull/164692
More information about the cfe-commits
mailing list