================
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -std=c++26 -fexperimental-new-constant-interpreter -x c++
%s -verify
+
+struct F {
+ bool V;
+};
+// Nominal cases
+// Type
+constexpr F f{true};
+struct [[=1]] f1 {};
+struct [[=1, =F{true}, =f]] f2 {};
+struct [[=1]] [[=2]] f3 {};
+// Declaration
+[[=1]] const F f4{}; // before declarator
+const F [[=1]] f40{}; // after declarator
+void f41([[=F{false}]]int i) {} // function parameters
+template<class T> [[=3]] void f42(T t); // non dep on template decl
+// Redeclaration
+[[=2, =3, =2]] void f5();
+void f5 [[=4, =2]] ();
+// Alias
+using A1 [[=1]] = int;
+// Error case
+// Right hand side of a alias declaration
+using A2 = [[=2]] int; // expected-error {{an attribute list cannot appear
here}}
+using A3 = int [[=2]]; // expected-error {{annotations are not permitted on
defining-type-id}}
----------------
shafik wrote:
Also like to see this `using A4 = unsigned [[=1]] int;`
https://github.com/llvm/llvm-project/pull/166287
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits