@@ -14,6 +14,7 @@ struct Foo {
14
14
static constexpr float cexpr_float = 2.0 + 1.0 ;
15
15
static constexpr Enum cexpr_enum = Enum::VAL;
16
16
static constexpr Empty cexpr_empty{};
17
+ static inline Enum inline_enum = Enum::VAL;
17
18
18
19
template <typename T>
19
20
static constexpr T cexpr_template{};
@@ -55,6 +56,9 @@ int main() {
55
56
// CHECK: ![[EMPTY_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_empty",
56
57
// CHECK-SAME: flags: DIFlagStaticMember)
57
58
59
+ // CHECK: ![[IENUM_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "inline_enum",
60
+ // CHECK-SAME: flags: DIFlagStaticMember, extraData: i32 -1)
61
+
58
62
// CHECK: ![[TEMPLATE_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_template",
59
63
// CHECK-SAME: flags: DIFlagStaticMember, extraData: i16 0)
60
64
@@ -74,6 +78,10 @@ int main() {
74
78
// CHECK: ![[ENUM_VAR]] = distinct !DIGlobalVariable(name: "cexpr_enum", linkageName:
75
79
// CHECK-SAME: isLocal: true, isDefinition: true, declaration: ![[ENUM_DECL]])
76
80
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
+
77
85
// CHECK: !DIGlobalVariableExpression(var: ![[TEMPLATE_VAR:[0-9]+]], expr: !DIExpression(DW_OP_constu, 0, DW_OP_stack_value))
78
86
// CHECK: ![[TEMPLATE_VAR]] = distinct !DIGlobalVariable(name: "cexpr_template", linkageName:
79
87
// CHECK-SAME: isLocal: true, isDefinition: true, declaration: ![[TEMPLATE_DECL]], templateParams: ![[TEMPLATE_PARMS:[0-9]+]])
0 commit comments