[Lldb-commits] [PATCH] D54454: Be more permissive in what we consider a variable name.
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 12 17:00:59 PST 2018
zturner added a comment.
In https://reviews.llvm.org/D54454#1296377, @jingham wrote:
> Those seem legit things to try to capture, though a little esoteric. Since "frame variable" and "target variable" didn't support these constructs before you should certainly add some tests for that.
> The frame variable parser also supports:
> (lldb) frame variable foo
> where foo is anything that can produce "vector" like children (e.g. std::vector's). Will your change work with that?
Might need to modify the regex to stop at `[`, but then it should. Might as well make `target variable` work with that syntax too, or at least there's no reason to add special code to `frame variable` that's not in `target variable`. I think the regex should just also stop at an open brace, that way everything should "just work". So perhaps Greg's suggestion of not using a regex at all, but just `find_first_of(".-[")` is sufficient. (There are still some even more obscure cases where `[` can appear in a template argument, but it's so obscure that I think it's better to optimize for the common case).
More information about the lldb-commits