[Lldb-commits] [PATCH] D59960: Fix for ambiguous lookup in expressions between local variable and namespace

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 12 11:03:06 PDT 2019


clayborg added a comment.

Jim Ingham said:

> 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

I am fine if the strstr method is already in place, then my objection is gone.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59960/new/

https://reviews.llvm.org/D59960





More information about the lldb-commits mailing list