clayborg wrote:

So regarding:
```
lldb-unit :: 
SymbolFile/PDB/./SymbolFilePDBTests.exe/SymbolFilePDBTests/TestMaxMatches
```
This test was testing the wrong thing. From the looks of 
`SymbolFilePDBTests::TestMaxMatches(...)` I thought it was finding multiple 
matches when we didn't ask for a limit, and then it would iterate over the 
number of actual matches up to 10 and see if they found the exact number of 
matches. The problem is there is only one match for `ClassTypedef` (see 
`lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-types.cpp` to verify). The old 
code would ask for all matches and only find 1, then it would iterate from 0 to 
< 1, so it would just call `FindTypes(...)` again and find that we have 1 of 1 
matches. I figured that the test has multiple `ClassTypedef` entries in 
different scopes, but that isn't the case. So to fix this test I just need to 
fix `SymbolFilePDBTests::TestMaxMatches(...)` to verify there is 1 match in 
both cases. This test could be improved to actually test what it is supposed 
to. That will involve adding multiple `ClassTypedef` entries at different 
scopes (inside a namespace, in a class, and at the top level), but I will fix 
it for now. I also found an inefficient loop in `SymbolFilePDB::FindTypes(...)` 
that I will fix along with the fix.

https://github.com/llvm/llvm-project/pull/74786
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to