[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:05 PDT 2025


================
@@ -3689,6 +3689,11 @@ defm application_extension : BoolFOption<"application-extension",
   PosFlag<SetTrue, [], [ClangOption, CC1Option],
           "Restrict code to those available for App Extensions">,
   NegFlag<SetFalse>>;
+defm reflection : BoolFOption<"reflection",
+  LangOpts<"Reflection">, DefaultFalse,
+  PosFlag<SetTrue, [], [ClangOption, CC1Option],
+          "Enable C++26 reflection">,
+  NegFlag<SetFalse>>;
----------------
Sirraide wrote:

```suggestion
  NegFlag<SetFalse>>, ShouldParseIf<cplusplus.KeyPath>;
```
Just so we don’t start trying to do reflexion in C.

https://github.com/llvm/llvm-project/pull/164692


More information about the cfe-commits mailing list