[Lldb-commits] [PATCH] D130045: Implement better path matching in FileSpecList::FindFileIndex(...).
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 27 05:30:13 PDT 2022
labath added a comment.
In D130045#3678054 <https://reviews.llvm.org/D130045#3678054>, @clayborg wrote:
> In D130045#3675738 <https://reviews.llvm.org/D130045#3675738>, @labath wrote:
>
>> In D130045#3666610 <https://reviews.llvm.org/D130045#3666610>, @JDevlieghere wrote:
>>
>>> I'm slightly worried about the change to make the new "fuzzy" matching the default. While it makes sense for the breakpoints, I wouldn't generally expect `./a/b/c/main.cpp` to match `/build/a/b/c/main.cpp`,
>>
>> Would you expect that `main.cpp` "generally" matches `/build/a/b/c/main.cpp`?
>>
>> (I'm not arguing for/against anything (yet, at least), but I would like to hear your reasoning if the answer to the question is "yes".)
>
> I would say it should match. If FindFileIndex is currently called with a FileSpec that only has "main.cpp" as the m_filename, then it will fall back to only matching by filename even if "full = true;". I would expect it to work the other way around too if we have any files in the file list that are base name only. Does that make sense?
It makes sense to me, but the question was mainly for Jonas -- I'm sorry if that wasn't clear. I'm wondering if he sees a fundamental difference between "`./a/b/c/main.cpp` matching `/build/a/b/c/main.cpp`" and "`main.cpp` matching `/build/a/b/c/main.cpp`". The second I believe is true in the status quo as well.
Because I don't see much of a difference -- the former seems like an extension of a general principle of "fuzzy" matching that guides the latter.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130045/new/
https://reviews.llvm.org/D130045
More information about the lldb-commits
mailing list