[Lldb-commits] [PATCH] D32100: [Expression parser] Return both types and variables
Sean Callanan via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 14 15:56:35 PDT 2017
spyffe created this revision.
Many times a user wants to access a type when there's a variable of the same name, or a variable when there's a type of the same name. Depending on the precise context, currently the expression parser can fail to resolve one or the other.
This is because `ClangExpressionDeclMap` has logic to limit the amount of information it searches, and that logic sometimes cuts down the search prematurely. This patch removes some of those early exits.
In that sense, this patch trades performance (early exit is faster) for correctness.
I've also included two new test cases showing examples of this behavior – as well as modifying an existing test case that gets it wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 30654 bytes
Desc: not available
More information about the lldb-commits