[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / debug-info-preferred-type.cpp
blob6406657a18e925c8084afef11b558eaf615174b9
1 // RUN: %clang -target x86_64-linux -g -S -emit-llvm -o - %s | FileCheck %s
3 struct A {
4 enum E : unsigned {};
5 [[clang::preferred_type(E)]] unsigned b : 2;
6 } a;
8 // CHECK-DAG: [[ENUM:![0-9]+]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"{{.*}}
9 // CHECK-DAG: !DIDerivedType(tag: DW_TAG_member, name: "b",{{.*}} baseType: [[ENUM]]