Debian Codegraph @

clang/test/Modules/pr72828.cppm

raw
1 // Test that we can handle capturing structured bindings.
2 //
3 // RUN: rm -fr %t
4 // RUN: mkdir %t
5 //
6 // RUN: %clang_cc1 -std=c++23 -triple %itanium_abi_triple \
7 // RUN: %s -emit-module-interface -o %t/m.pcm
8 // RUN: %clang_cc1 -std=c++23 -triple %itanium_abi_triple \
9 // RUN: -emit-llvm -disable-llvm-passes %t/m.pcm \
10 // RUN: -o - | FileCheck %s
11
12 export module m;
13
14 struct s {
15 int m;
16 };
17
18 void f() {
19 auto [x] = s();
20 (void) [x] {};
21 }
22
23 // Check that we can generate the LLVM IR expectedly.
24 // CHECK: define{{.*}}@_ZGIW1m