[Lldb-commits] [lldb] [lldb] Support alternatives for scope format entries (PR #137751)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon May 5 15:58:40 PDT 2025
JDevlieghere wrote:
@Michael137 I looked into adding the diagnostic you asked about and while the implementation is relatively straightforward, I'm even more convinced that I don't think it belongs there because it's a semantic rather than a syntax error.
We can detect a scope followed by an alternative scope, i.e. something like `{{foo}|bar}` but what about something like `{foo|bar}`. Just like a scope, `foo` will always resolve, so technically `bar` is unreachable. Should we diagnose this too? And what about `{${frame.pc}||bar}`. The empty string between the two pipes will always resolve. In other words, I don't think this warrants special casing as there are plenty of other scenarios that trigger similar behavior that would be much harder to diagnose.
https://github.com/llvm/llvm-project/pull/137751
More information about the lldb-commits
mailing list