summaryrefslogtreecommitdiff
path: root/lldb/test/API/lang/cpp/decl-from-submodule/TestDeclFromSubmodule.py
AgeCommit message (Collapse)Author
2025-06-06[lldb][Modules] Make decls from submodules visible for name lookup (#143098)Michael Buch
This patch ensures we can find decls in submodules during expression evaluation. Previously, submodules would have all their decls marked as `Hidden`. When Clang asked LLDB for decls, it would see them in the submodule but `clang::Sema` would reject them because they weren't `Visible` (specifically, `getAcceptableDecl` would fail during `CppNameLookup`). Here we just mark the submodule as visible to work around this problem.
2025-05-30[lldb][test] Disable DeclFromSubmodule test on WindowsDavid Spickett
Or more precisely, when linking with link.exe, but Windows is our closest proxy for that right now. This test requires the DWARF info to work, on the Windows on Arm buildbot it fails: ``` AssertionError: Ran command: "expr func(1, 2)" Got output: error: <user expression 0>:1:1: use of undeclared identifier 'func' 1 | func(1, 2) | ^~~~ Expecting start string: "error: <user expression 0>:1:1: 'func' has unknown return type" (was not found) ```
2025-05-30[lldb][SymbolFileDWARF] Fall back to using parent DW_AT_LLVM_include_path ↵Michael Buch
for submodules (#142044) Inferred submodule declarations are emitted in DWARF as `DW_TAG_module`s without `DW_AT_LLVM_include_path`s. Instead the parent DIE will have the include path. This patch adds support for such setups. Without this, the `ClangModulesDeclVendor` would fail to `AddModule` the submodules (i.e., compile and load the submodules). This would cause errors such as: ``` note: error: Header search couldn't locate module 'TopLevel' ``` The test added here also tests https://github.com/llvm/llvm-project/pull/141220. Without that patch we'd fail with: ``` note: error: No module map file in /Users/jonas/Git/llvm-worktrees/llvm-project/lldb/test/API/lang/cpp/decl-from-submodule ``` Unfortunately the embedded clang instance doesn't allow us to use the decls we find in the modules. But we'll try to fix that in a separate patch. rdar://151022173