[clang] [clang] Diagnose dangling references for parenthesized aggregate initialization. (PR #117690)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 26 03:45:12 PST 2024
================
@@ -0,0 +1,42 @@
+// RUN: %clang_cc1 -verify -std=c++20 %s -fsyntax-only
+
+namespace std {
+template <class T> struct remove_reference { typedef T type; };
+template <class T> struct remove_reference<T&> { typedef T type; };
+template <class T> struct remove_reference<T&&> { typedef T type; };
+
+template <class T> typename remove_reference<T>::type &&move(T &&t);
+} // namespace std
+
+// dcl.init 16.6.2.2
+struct A {
----------------
usx95 wrote:
Can you also add more nesting:
https://godbolt.org/z/9jbsxPjrW
https://godbolt.org/z/cj97eaPsK
https://github.com/llvm/llvm-project/pull/117690
More information about the cfe-commits
mailing list