@@ -120,17 +120,15 @@ def check_global_var(self, name: str, expect_type, expect_val):
120120 self .assertEqual (varobj .type .name , expect_type )
121121 self .assertEqual (varobj .value , expect_val )
122122
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 })
128125 lldbutil .run_to_source_breakpoint (
129126 self , "// break here" , lldb .SBFileSpec ("main.cpp" )
130127 )
131128
132129 self .check_global_var ("A::int_val" , "const int" , "1" )
133130 self .check_global_var ("A::int_val_with_address" , "const int" , "2" )
131+ self .check_global_var ("A::inline_int_val" , "const int" , "3" )
134132 self .check_global_var ("A::bool_val" , "const bool" , "true" )
135133 self .check_global_var ("A::enum_val" , "Enum" , "enum_case2" )
136134 self .check_global_var ("A::enum_bool_val" , "EnumBool" , "enum_bool_case1" )
@@ -144,6 +142,16 @@ def test_inline_static_members(self):
144142 "ClassWithConstexprs::scoped_enum_val" , "ScopedEnum" , "scoped_enum_case2"
145143 )
146144
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+
147155 # With older versions of Clang, LLDB fails to evaluate classes with only
148156 # constexpr members when dsymutil is enabled
149157 @expectedFailureAll (
@@ -170,15 +178,12 @@ def test_class_with_only_constexpr_static(self):
170178 "ClassWithEnumAlias::enum_alias_alias" , result_value = "scoped_enum_case1"
171179 )
172180
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 ):
177182 """Tests that the expression evaluator and SBAPI can both
178183 correctly determine the requested inline static variable
179184 in the presence of multiple variables of the same name."""
180185
181- self .build ()
186+ self .build (dictionary = { "CXXFLAGS_EXTRAS" : flags } )
182187 lldbutil .run_to_name_breakpoint (self , "bar" )
183188
184189 self .check_global_var ("ns::Foo::mem" , "const int" , "10" )
@@ -188,6 +193,16 @@ def test_shadowed_static_inline_members(self):
188193 self .expect_expr ("ns::Foo::mem" , result_value = "10" )
189194 self .expect_expr ("::Foo::mem" , result_value = "-29" )
190195
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+
191206 @expectedFailureAll (bugnumber = "target var doesn't honour global namespace" )
192207 def test_shadowed_static_inline_members_xfail (self ):
193208 self .build ()
0 commit comments