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[0]
>
> 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).
https://reviews.llvm.org/D54454
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits