[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CodeGenCXX / cxx20-p0388-unbound-ary.cpp
bloba29f4d720c1de4e6184a7f71b2ed709efde9c8ff
1 // RUN: %clang_cc1 %s -triple %itanium_abi_triple -std=c++20 -emit-llvm -O2 -o - | FileCheck %s
3 // p0388 conversions to unbounded array
4 // dcl.init.list/3
6 namespace One {
7 int ga[1];
9 // CHECK-LABEL: @_ZN3One5frob1Ev
10 // CHECK-NEXT: entry:
11 // CHECK-NEXT: ret ptr @_ZN3One2gaE
12 auto &frob1() {
13 int(&r1)[] = ga;
15 return r1;
18 // CHECK-LABEL: @_ZN3One5frob2ERA1_i
19 // CHECK-NEXT: entry:
20 // CHECK-NEXT: ret ptr %arp
21 auto &frob2(int (&arp)[1]) {
22 int(&r2)[] = arp;
24 return r2;
27 // CHECK-LABEL: @_ZN3One3fooEi
28 // CHECK-NEXT: entry:
29 // CHECK-NEXT: ret void
30 void foo(int a) {
31 auto f = [](int(&&)[]) {};
32 f({a});
35 } // namespace One