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