xref: /aosp_15_r20/external/clang/test/CodeGenCXX/debug-info-scoped-class.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -std=c++11 \
2*67e74705SXin Li // RUN:   -triple thumbv7-apple-ios %s -o - | FileCheck %s
3*67e74705SXin Li 
4*67e74705SXin Li // This forward-declared scoped enum will be created while building its own
5*67e74705SXin Li // declcontext. Make sure it is only emitted once.
6*67e74705SXin Li 
7*67e74705SXin Li struct A {
8*67e74705SXin Li   enum class Return;
9*67e74705SXin Li   Return f1();
10*67e74705SXin Li };
f2()11*67e74705SXin Li A::Return* f2() {}
12*67e74705SXin Li 
13*67e74705SXin Li // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Return",
14*67e74705SXin Li // CHECK-SAME:             flags: DIFlagFwdDecl,
15*67e74705SXin Li // CHECK-NOT:              tag: DW_TAG_enumeration_type, name: "Return"
16