kuilpd wrote:
> Ok, plan B. :-) Issue the deprecated message for now. When you implement the > binary subtraction, [expr - expr] will always be subtraction, but have it > issue a warning (only if done inside square brackets) that it IS subtraction, > and that if people are looking for bitfield subranges they need to use ':' > instead. After entire major release, remove the warning. Would that satisfy > both you and @jimingham ? I would, except that that's the problem I described, once there is a binary subtraction I don't think there's really a way to detect that something is `expr - expr`. Parser will just parse it as a single `expr`, since `-` is a part of grammar in said `expr`. And we don't even have a way to look inside the parsed AST subtree to see if it had any nodes that are binary subtraction. We could write code to do that, which would involve saving parents of all nodes, just to remove this code later anyway. That's why the only thing I could think of is to limit parsing the allowed expressions in square brackets to something that doesn't have a '-' to begin with. Alternatively, we could just delay adding binary subtraction at all until after the next release, and just proceed with other binary math and logic operators for now. We'll have the error on `-` until release, then remove it in the mainline after, and the error will still stay in that release version. https://github.com/llvm/llvm-project/pull/173410 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
