[clang] [clang] Check`T` and `U` operands of __reference_constructs_from_temporary are complete types (PR #206703)
Yihan Wang via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 30 05:00:08 PDT 2026
================
@@ -12,3 +12,9 @@ void f() {
__is_trivially_relocatable(S); // expected-error{{incomplete type 'S' used in type trait expression}}
__is_trivially_relocatable(S[]); // expected-error{{incomplete type 'S' used in type trait expression}}
}
+
+struct NoConv;
+struct Bad;
+
+constexpr bool a = __reference_constructs_from_temporary(S, NoConv&&); // expected-error{{incomplete type 'Bad' used in type trait expression}}
+
----------------
yronglin wrote:
Fixed. we should pass Bad as the 1st operand. I originally wanted to avoid introducing 'Bad' (since 'S' could achieve the same result), but it looks like the change was only partially implemented.
https://github.com/llvm/llvm-project/pull/206703
More information about the cfe-commits
mailing list