@@ -120,17 +120,15 @@ def check_global_var(self, name: str, expect_type, expect_val):
120
120
self .assertEqual (varobj .type .name , expect_type )
121
121
self .assertEqual (varobj .value , expect_val )
122
122
123
- @expectedFailureAll (dwarf_version = ["<" , "5" ])
124
- # On linux this passes due to the manual index
125
- @expectedFailureDarwin (debug_info = no_match (["dsym" ]))
126
- def test_inline_static_members (self ):
127
- self .build ()
123
+ def check_inline_static_members (self , flags ):
124
+ self .build (dictionary = {"CXXFLAGS_EXTRAS" : flags })
128
125
lldbutil .run_to_source_breakpoint (
129
126
self , "// break here" , lldb .SBFileSpec ("main.cpp" )
130
127
)
131
128
132
129
self .check_global_var ("A::int_val" , "const int" , "1" )
133
130
self .check_global_var ("A::int_val_with_address" , "const int" , "2" )
131
+ self .check_global_var ("A::inline_int_val" , "const int" , "3" )
134
132
self .check_global_var ("A::bool_val" , "const bool" , "true" )
135
133
self .check_global_var ("A::enum_val" , "Enum" , "enum_case2" )
136
134
self .check_global_var ("A::enum_bool_val" , "EnumBool" , "enum_bool_case1" )
@@ -144,6 +142,16 @@ def test_inline_static_members(self):
144
142
"ClassWithConstexprs::scoped_enum_val" , "ScopedEnum" , "scoped_enum_case2"
145
143
)
146
144
145
+ # On linux this passes due to the manual index
146
+ @expectedFailureDarwin (debug_info = no_match (["dsym" ]))
147
+ def test_inline_static_members_dwarf5 (self ):
148
+ self .check_inline_static_members ("-gdwarf-5" )
149
+
150
+ # On linux this passes due to the manual index
151
+ @expectedFailureDarwin (debug_info = no_match (["dsym" ]))
152
+ def test_inline_static_members_dwarf4 (self ):
153
+ self .check_inline_static_members ("-gdwarf-4" )
154
+
147
155
# With older versions of Clang, LLDB fails to evaluate classes with only
148
156
# constexpr members when dsymutil is enabled
149
157
@expectedFailureAll (
@@ -170,15 +178,12 @@ def test_class_with_only_constexpr_static(self):
170
178
"ClassWithEnumAlias::enum_alias_alias" , result_value = "scoped_enum_case1"
171
179
)
172
180
173
- @expectedFailureAll (dwarf_version = ["<" , "5" ])
174
- # On linux this passes due to the manual index
175
- @expectedFailureDarwin (debug_info = no_match (["dsym" ]))
176
- def test_shadowed_static_inline_members (self ):
181
+ def check_shadowed_static_inline_members (self , flags ):
177
182
"""Tests that the expression evaluator and SBAPI can both
178
183
correctly determine the requested inline static variable
179
184
in the presence of multiple variables of the same name."""
180
185
181
- self .build ()
186
+ self .build (dictionary = { "CXXFLAGS_EXTRAS" : flags } )
182
187
lldbutil .run_to_name_breakpoint (self , "bar" )
183
188
184
189
self .check_global_var ("ns::Foo::mem" , "const int" , "10" )
@@ -188,6 +193,16 @@ def test_shadowed_static_inline_members(self):
188
193
self .expect_expr ("ns::Foo::mem" , result_value = "10" )
189
194
self .expect_expr ("::Foo::mem" , result_value = "-29" )
190
195
196
+ # On linux this passes due to the manual index
197
+ @expectedFailureDarwin (debug_info = no_match (["dsym" ]))
198
+ def test_shadowed_static_inline_members_dwarf5 (self ):
199
+ self .check_shadowed_static_inline_members ("-gdwarf-5" )
200
+
201
+ # On linux this passes due to the manual index
202
+ @expectedFailureDarwin (debug_info = no_match (["dsym" ]))
203
+ def test_shadowed_static_inline_members_dwarf4 (self ):
204
+ self .check_shadowed_static_inline_members ("-gdwarf-4" )
205
+
191
206
@expectedFailureAll (bugnumber = "target var doesn't honour global namespace" )
192
207
def test_shadowed_static_inline_members_xfail (self ):
193
208
self .build ()
0 commit comments