Michael137 created this revision.
Michael137 added a reviewer: aprantl.
Herald added a project: All.
Michael137 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
These tests have begun failing starting with commit
`69a6417406a1b0316a1fa6aeb63339d0e1d2abbd`, which
added a new `import` to `ASTNodeImporter::VisitTypedefType`.
This trips an assertion in following way:
1. When creating a persistent variable for the result we call `CopyType` (in
`DeportType`) under a `CompleteTagDeclsScope` (which is supposed to complete
all decls newly imported in the `CopyType` call).
2. During `CopyType` we call `ASTNodeImporter::VisitTypedefType`
3. This now has a second import call on the desugared type
4. In `ASTImporterDelegate::ImportImpl` we will now try to import a decl that
we originally got from the `std` module (which means it has no valid origin).
But since we’re doing this under a CompleteTagDeclsScope, the
`NewDeclListener::NewDeclImported` adds the decl to the list of decls to
complete after the `CopyType` call. But this list shouldn’t contain decls with
invalid origins because we assert this in `~CompleteTagDeclsScope`, which is
where the tests crash.
We suspect that we previously didn’t see this assert trigger because by the time
we create the result variable we are using an AST whose decls all have
a valid debug-info origin (constructed with the help of the std module).
So we never expected decls from modules to be imported under
`CompleteTagDeclsScope` without a m_sema available (which is the case by
the time we get to `DeportType`). Since there is no `m_sema` available,
`CxxModuleHandler::Import` trivially returns and the decls don’t get added
to the `m_decls_to_ignore` list and count as "newly imported decls".
Skip this test for now until we have a fix or the origin tracking gets
refactored (see https://reviews.llvm.org/D101950).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D135178
Files:
lldb/test/API/commands/expression/import-std-module/vector-bool/TestVectorBoolFromStdModule.py
lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
Index:
lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
===================================================================
---
lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
+++
lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
@@ -11,6 +11,7 @@
@add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang"))
+ @skipIf(bugnumber="rdar://100741983")
def test(self):
self.build()
Index:
lldb/test/API/commands/expression/import-std-module/vector-bool/TestVectorBoolFromStdModule.py
===================================================================
---
lldb/test/API/commands/expression/import-std-module/vector-bool/TestVectorBoolFromStdModule.py
+++
lldb/test/API/commands/expression/import-std-module/vector-bool/TestVectorBoolFromStdModule.py
@@ -11,6 +11,7 @@
@add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang"))
+ @skipIf(bugnumber="rdar://100741983")
def test(self):
self.build()
Index: lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
===================================================================
--- lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
+++ lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
@@ -11,6 +11,7 @@
@add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang"))
+ @skipIf(bugnumber="rdar://100741983")
def test(self):
self.build()
Index: lldb/test/API/commands/expression/import-std-module/vector-bool/TestVectorBoolFromStdModule.py
===================================================================
--- lldb/test/API/commands/expression/import-std-module/vector-bool/TestVectorBoolFromStdModule.py
+++ lldb/test/API/commands/expression/import-std-module/vector-bool/TestVectorBoolFromStdModule.py
@@ -11,6 +11,7 @@
@add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang"))
+ @skipIf(bugnumber="rdar://100741983")
def test(self):
self.build()
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits