================
@@ -19,3 +19,23 @@ void foo(int a) {
 // CHECK-NEXT:            `-InitListExpr 0x{{[^ ]*}} <col:5, col:7> 'int[1]'
 // CHECK-NEXT:              `-ImplicitCastExpr 0x{{[^ ]*}} <col:6> 'int' 
<LValueToRValue>
 // CHECK-NEXT:                `-DeclRefExpr 0x{{[^ ]*}} <col:6> 'int' lvalue 
ParmVar 0x{{[^ ]*}} 'a' 'int'
+
+void bar(int a) {
+  auto g = [](const int(&)[]) {};
+  g({a});
+}
+
+// Same as above, but binding to a const lvalue reference: the cast to the
+// incomplete array type is an lvalue rather than an xvalue.
+
----------------
zyn0217 wrote:

I would preserve only 1 test. They are duplicate anyway

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

Reply via email to