Skip to content

Commit 51e0997

Browse files
committed
fixup! test: make variable name clearer
1 parent 89dc41d commit 51e0997

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

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

+11-11
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ struct Empty {};
99
constexpr auto func() { return 25; }
1010

1111
struct Foo {
12-
static constexpr int cexpr_int = func();
12+
static constexpr int cexpr_int_with_addr = func();
1313
static constexpr int cexpr_int2 = func() + 1;
1414
static constexpr float cexpr_float = 2.0 + 1.0;
1515
static constexpr Enum cexpr_enum = Enum::VAL;
16-
static constexpr Empty cexpr_empty{};
16+
static constexpr Empty cexpr_struct_with_addr{};
1717
static inline Enum inline_enum = Enum::VAL;
1818

1919
template<typename T>
@@ -24,24 +24,24 @@ int main() {
2424
Foo f;
2525

2626
// Force global variable definitions to be emitted.
27-
(void)&Foo::cexpr_int;
28-
(void)&Foo::cexpr_empty;
27+
(void)&Foo::cexpr_int_with_addr;
28+
(void)&Foo::cexpr_struct_with_addr;
2929

30-
return Foo::cexpr_int + Foo::cexpr_float
30+
return Foo::cexpr_int_with_addr + Foo::cexpr_float
3131
+ (int)Foo::cexpr_enum + Foo::cexpr_template<short>;
3232
}
3333

34-
// CHECK: @{{.*}}cexpr_int{{.*}} =
34+
// CHECK: @{{.*}}cexpr_int_with_addr{{.*}} =
3535
// CHECK-SAME: !dbg ![[INT_GLOBAL:[0-9]+]]
3636

37-
// CHECK: @{{.*}}cexpr_empty{{.*}} =
37+
// CHECK: @{{.*}}cexpr_struct_with_addr{{.*}} =
3838
// CHECK-SAME !dbg ![[EMPTY_GLOBAL:[0-9]+]]
3939

4040
// CHECK: !DIGlobalVariableExpression(var: ![[INT_VAR:[0-9]+]], expr: !DIExpression())
41-
// CHECK: ![[INT_VAR]] = distinct !DIGlobalVariable(name: "cexpr_int", linkageName:
41+
// CHECK: ![[INT_VAR]] = distinct !DIGlobalVariable(name: "cexpr_int_with_addr", linkageName:
4242
// CHECK-SAME: isLocal: false, isDefinition: true, declaration: ![[INT_DECL:[0-9]+]])
4343

44-
// CHECK: ![[INT_DECL]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_int",
44+
// CHECK: ![[INT_DECL]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_int_with_addr",
4545
// CHECK-SAME: flags: DIFlagStaticMember
4646
// CHECK-NOT: extraData:
4747

@@ -57,7 +57,7 @@ int main() {
5757
// CHECK-SAME: flags: DIFlagStaticMember
5858
// CHECK-NOT: extraData:
5959

60-
// CHECK: ![[EMPTY_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_empty",
60+
// CHECK: ![[EMPTY_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_struct_with_addr",
6161
// CHECK-SAME: flags: DIFlagStaticMember
6262
// CHECK-NOT: extraData:
6363

@@ -70,7 +70,7 @@ int main() {
7070
// CHECK-NOT: extraData:
7171

7272
// CHECK: !DIGlobalVariableExpression(var: ![[EMPTY_VAR:[0-9]+]], expr: !DIExpression())
73-
// CHECK: ![[EMPTY_VAR]] = distinct !DIGlobalVariable(name: "cexpr_empty", linkageName:
73+
// CHECK: ![[EMPTY_VAR]] = distinct !DIGlobalVariable(name: "cexpr_struct_with_addr", linkageName:
7474
// CHECK-SAME: isLocal: false, isDefinition: true, declaration: ![[EMPTY_DECL]])
7575

7676
// CHECK: !DIGlobalVariableExpression(var: ![[INT_VAR2:[0-9]+]], expr: !DIExpression(DW_OP_constu, 26, DW_OP_stack_value))

0 commit comments

Comments
 (0)