Skip to content

[lldb][Type Completion] Remove a few XFAILs and an assert related to redecl-completion #8689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9510,7 +9510,8 @@ static void ConnectRedeclToPrev(TypeSystemClang &ts, T *prev, T *redecl) {
// decl.
ts.GetTypeForDecl(redecl);
// The previous decl and the redeclaration both declare the same type.
assert(prev->getTypeForDecl() == redecl->getTypeForDecl());
// FIXME: rdar://123500660, this is causing large number of test failures.
// assert(prev->getTypeForDecl() == redecl->getTypeForDecl());
}

/// Returns the ClangModuleID for the given declaration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def test_expr_completion(self):
self.complete_from_to("expr myVec.__m", "expr myVec.__mem")
self.complete_from_to("expr myVec._M", "expr myVec._Mem")

@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
def test_expr_completion_with_descriptions(self):
self.build()
self.main_source = "main.cpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ def _check_incomplete_frame_variable_output(self):
for command, expect_items in command_expect_pairs:
self.expect(command, substrs=expect_items)

@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
@skipIf(bugnumber="pr46284", debug_info="gmodules")
@skipIfWindows # Clang emits type info even with -flimit-debug-info
# Requires DW_CC_pass_by_* attributes from Clang 7 to correctly call
Expand Down Expand Up @@ -224,7 +223,6 @@ def test_one_and_two_debug(self):

self._check_incomplete_frame_variable_output()

@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
@skipIf(bugnumber="pr46284", debug_info="gmodules")
@skipIfWindows # Clang emits type info even with -flimit-debug-info
# Requires DW_CC_pass_by_* attributes from Clang 7 to correctly call
Expand Down Expand Up @@ -293,7 +291,6 @@ def test_two_debug(self):

self._check_incomplete_frame_variable_output()

@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
@skipIf(bugnumber="pr46284", debug_info="gmodules")
@skipIfWindows # Clang emits type info even with -flimit-debug-info
# Requires DW_CC_pass_by_* attributes from Clang 7 to correctly call
Expand Down
19 changes: 17 additions & 2 deletions lldb/test/API/functionalities/type_lookup/TestTypeLookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,24 @@ def test_type_lookup(self):
"type lookup PleaseDontBeARealTypeThatExists",
substrs=["no type was found matching 'PleaseDontBeARealTypeThatExists'"],
)
self.expect("type lookup MyCPPClass", substrs=["setF", "float getF"])
self.expect("type lookup MyClass", substrs=["setF", "float getF"])
self.expect(
"type lookup MyObjCClass",
substrs=["@interface MyObjCClass", "int x", "int y"],
)

@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
@skipUnlessDarwin
@skipIf(archs=["i386"])
@skipIfDarwinEmbedded # swift crash inspecting swift stdlib with little other swift loaded <rdar://problem/55079456>
def test_type_lookup(self):
"""Test type lookup command."""
self.build()
self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)

lldbutil.run_break_set_by_file_and_line(
self, "main.mm", self.line, num_expected_locations=1, loc_exact=True
)

self.runCmd("run", RUN_SUCCEEDED)
self.expect("type lookup MyCPPClass", substrs=["setF", "float getF"])
self.expect("type lookup MyClass", substrs=["setF", "float getF"])
2 changes: 0 additions & 2 deletions lldb/test/API/lang/c/shared_lib/TestSharedLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ def common_test_expr(self, preload_symbols):

self.expect("expression GetMeASubFoo(my_foo_ptr)", startstr="(sub_foo *) $")

@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
def test_expr(self):
"""Test that types work when defined in a shared library and forward-declared in the main executable"""
self.common_test_expr(True)

@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
def test_expr_no_preload(self):
"""Test that types work when defined in a shared library and forward-declared in the main executable, but with preloading disabled"""
self.common_test_expr(False)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class SharedLibStrippedTestCase(TestBase):
@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
@expectedFailureAll(oslist=["windows"])
def test_expr(self):
"""Test that types work when defined in a shared library and forwa/d-declared in the main executable"""
Expand Down