Skip to content

Commit 59e1072

Browse files
committed
fixup! add test-case for explicitly inline member
1 parent 81bd540 commit 59e1072

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/test/CodeGenCXX/debug-info-static-inline-member.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ struct Foo {
1414
static constexpr float cexpr_float = 2.0 + 1.0;
1515
static constexpr Enum cexpr_enum = Enum::VAL;
1616
static constexpr Empty cexpr_empty{};
17+
static inline Enum inline_enum = Enum::VAL;
1718

1819
template<typename T>
1920
static constexpr T cexpr_template{};
@@ -55,6 +56,9 @@ int main() {
5556
// CHECK: ![[EMPTY_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_empty",
5657
// CHECK-SAME: flags: DIFlagStaticMember)
5758

59+
// CHECK: ![[IENUM_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "inline_enum",
60+
// CHECK-SAME: flags: DIFlagStaticMember, extraData: i32 -1)
61+
5862
// CHECK: ![[TEMPLATE_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_template",
5963
// CHECK-SAME: flags: DIFlagStaticMember, extraData: i16 0)
6064

@@ -74,6 +78,10 @@ int main() {
7478
// CHECK: ![[ENUM_VAR]] = distinct !DIGlobalVariable(name: "cexpr_enum", linkageName:
7579
// CHECK-SAME: isLocal: true, isDefinition: true, declaration: ![[ENUM_DECL]])
7680

81+
// CHECK: !DIGlobalVariableExpression(var: ![[IENUM_VAR:[0-9]+]], expr: !DIExpression(DW_OP_constu, {{.*}}, DW_OP_stack_value))
82+
// CHECK: ![[IENUM_VAR]] = distinct !DIGlobalVariable(name: "inline_enum", linkageName:
83+
// CHECK-SAME: isLocal: true, isDefinition: true, declaration: ![[IENUM_DECL]])
84+
7785
// CHECK: !DIGlobalVariableExpression(var: ![[TEMPLATE_VAR:[0-9]+]], expr: !DIExpression(DW_OP_constu, 0, DW_OP_stack_value))
7886
// CHECK: ![[TEMPLATE_VAR]] = distinct !DIGlobalVariable(name: "cexpr_template", linkageName:
7987
// CHECK-SAME: isLocal: true, isDefinition: true, declaration: ![[TEMPLATE_DECL]], templateParams: ![[TEMPLATE_PARMS:[0-9]+]])

0 commit comments

Comments
 (0)