-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't warn when using operator<=> with 0 #3581
Don't warn when using operator<=> with 0 #3581
Conversation
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, at least :)
Thanks! FYI @strega-nil-ms I pushed very minor changes after you approved. |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for restoring the usability of the zero-as-null-pointer-constant warning! |
LLVM has an issue: llvm/llvm-project#43670
That issue marked as
libc++
but actually every C++ standard library affected , and MSVC STL and libstdc++.I also created: https://reviews.llvm.org/D146372
Yes, after that patch we accept
but probably this is fine because the behavior is undefined. At least we don't warn on valid code.