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


================
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 %s -std=c++26 -freflection -fblocks -fsyntax-only
+
+struct A {
+  int operator^(int (^block)(int x)) const {
+    return block(0);
+  }
+};
+
+
+int main()
+{
+    (void)(A{}^^(int y){ return y + 1; });
----------------
Sirraide wrote:

Another thing I just noticed; I don’t think we need a separate `clang/testReflection` directory for this; just put it in `clang/test/Parser/`/`clang/test/SemaCXX`

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


More information about the cfe-commits mailing list