3 Commits

Author SHA1 Message Date
Michael Buch
3ddc1e1cf3 [lldb][test] XFAIL TestClangModulesDeclLookup.test on win-remote-linux
Failing on the `lldb-remote-linux-win` buildbot with:
```
| (lldb) expression foo(50)
|                          ^
| <stdin>:54:34: note: possible intended match here
| (lldb) target modules dump ast --filter foo
|                                  ^
|
| Input file: <stdin>
| Check file: C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\Shell\Expr\TestClangModulesDeclLookup.test
|
| -dump-input=help explains the following input dump.
|
| Input was:
| <<<<<<
|            .
|            .
|            .
|           46:  5 foo(10);
|           47: -> 6 return 0;
|           48:  ^
|           49:  7 }
|           50:  8
|           51: (lldb) expression foo(50)
| next:57'0                              X error: no match found
|           52:  ^~~~~~
| next:57'0     ~~~~~~~~
|           53:  error: 'foo' has unknown return type; cast the call to its declared return type
| next:57'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|           54: (lldb) target modules dump ast --filter foo
| next:57'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| next:57'1                                      ?           possible intended match
|           55: Dumping clang ast for 4 modules.
| next:57'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| >>>>>>
`-----------------------------
error: command failed with exit status: 1
```

Fixes https://github.com/llvm/llvm-project/issues/142590
2025-06-03 13:16:03 +01:00
Michael Buch
05547fc3ec [lldb][test] XFAIL TestClangModulesDeclLookup on Linux
Failing on the Linux bots with:
```
+ /home/worker/2.0.1/lldb-x86_64-debian/build/bin/FileCheck /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/Shell/Expr/TestClangModulesDeclLookup.test
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/Shell/Expr/TestClangModulesDeclLookup.test:56:15: error: CHECK-NEXT: expected string not found in input
              ^
<stdin>:38:26: note: scanning from here
(lldb) expression foo(50)
                         ^
<stdin>:41:34: note: possible intended match here
(lldb) target modules dump ast --filter foo
                                 ^
```
2025-06-03 12:20:31 +01:00
Michael Buch
9c52b177ea [lldb][test] Add test for looking up decls in Clang modules for C++
Adds coverage for the code-path where
`ClangExpressionDeclMap::FindExternalVisibleDecls` finds a decl inside
of a Clang module (without explicitly having to import the module on the
LLDB CLI). AFAICT, we had not tests for this.

`LookupFunction` will try to find a `FunctionDecl` in debug-info. But if
no debug-info exists, it will ask the `ClangModulesDeclVendor` to search
for the function with the specified name in any of the Clang modules
that got added to it in `SetupDeclVendor`.
2025-06-03 12:10:15 +01:00