[Lldb-commits] [PATCH] D59960: Fix for ambiguous lookup in expressions between local variable and namespace
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 12 09:56:01 PDT 2019
This won't be complete, since we also get collisions between local variables and namespaces, and that wouldn't be detected by your heuristic.
I think the trick that Fred used in https://reviews.llvm.org/D46551 is actually pretty complete. An expression is never going to need to look up a variable if
strstr(expressionText, varname) == NULL
And OTOH if this is not NULL, there's a very good chance we will need to look it up. So this is a pretty optimal filter. We should clean this up (I think it caused some test failures with the new variable completion in expr, IIRC). If we need to do more after that is in place we can, but I bet this will end up with us for the most part only injecting local variables where they are needed.
Jim
> On Apr 12, 2019, at 7:21 AM, Greg Clayton via Phabricator <reviews at reviews.llvm.org> wrote:
>
> clayborg added a comment.
>
> Just thought of 1 additional way to allow us to pull in fewer var declarations: get a list of all of the member variable names in the current class when stopped in a class method and only add ones that match local variables. If we are in a static member variable then skip of course. Comments? Thoughts?
>
>
> CHANGES SINCE LAST ACTION
> https://reviews.llvm.org/D59960/new/
>
> https://reviews.llvm.org/D59960
>
>
>
More information about the lldb-commits
mailing list