================
@@ -1,6 +1,10 @@
 // RUN: %clang_cc1 -std=c++26 -freflection -triple x86_64-unknown-linux-gnu \
 // RUN:   -emit-llvm -o - %s -verify
 
+constexpr auto r = ^^int;
+constexpr auto q = r;
----------------
katzdm wrote:

Yes, variables of consteval-only type can have static storage duration and can 
even be odr-used. The caveat is that all such expressions that odr-use them 
must be in an immediate function context, such that the implementation can 
still just elide them from codegen.

But their external linkage means that such a variable could, for instance, be 
imported across module boundaries. Suitable restrictions to keep e.g., a 
reflection of a function with internal linkage from being exported are encoded 
by classifying certain reflections as TU-local values ([basic.link]/16.4).

https://github.com/llvm/llvm-project/pull/190356
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to