[clang] [clang-tools-extra] Remove ^^ as a token in OpenCL (PR #108224)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 12 09:44:06 PDT 2024
AaronBallman wrote:
> I think that the diagnostic change is reasonable. Clang doesn't support OpenCL C++ at present so we won't need to worry about it. However the mission of C++ for OpenCL is to track C++ and track OpenCL i.e. we may want to update to C++ with reflection. So it would be good to keep this as an option. But we don't have this plan right now.
>
> So if we keep this as reserve identifier for C++ for OpenCL it is probably the best approach since if one day we decide to upgrade it to C++ with reflection the code using `^^` would not longer be invalid. Does it make sense?
Thanks! Making sure I follow along, basically you're saying this patch is good because it keeps the `^^` token reserved, and if/when OpenCL supports C++, it can then use this token for reflection in C++ (if that's chosen by WG21 for the syntax) or use it for its own needs?
One thing to make sure we're both on the same page for -- should the OpenCL spec folks be alerted to the fact that `^^` as a single token conflicts with blocks in C? (That suggests it's perhaps not a good token to use for a binary operator and maybe they want to un-reserve it?)
https://github.com/llvm/llvm-project/pull/108224
More information about the cfe-commits
mailing list