-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Various cleanups #4230
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
Various cleanups #4230
Conversation
Pre-existing since the beginning of time, noted in the review for GH 4119. clang-format produces `throw(__VA_ARGS__)` with no space, which is annoying but not worth suppressing.
…pure. All other headers follow this pattern.
Nobody declares or calls them, including via the CNAME macro. Also, don't defend `_Stoll`'s definition against macros - this is stl/src where we have complete control.
clang-format exhibits "sticky" behavior here.
Noted during the review of GH 4154, took that suggestion exactly.
This doesn't drop all file comments, just the ones that I thought were especially unnecessary.
Every single one of these was `// MEOW function` where `MEOW` appears below (without any macroization).
This doesn't attempt to drop all newlines after open braces - many of them are arguably providing clarity.
Again, this doesn't attempt to drop all such newlines, many of which are providing clarity. These occurrences, all involving `_ITERATOR_DEBUG_LEVEL` or `_M_CEE_PURE`, looked imbalanced and were ancient relics of codebase processing.
|
|
||
| #define _RERAISE throw | ||
| #define _THROW(...) throw __VA_ARGS__ | ||
| #define _THROW(...) throw(__VA_ARGS__) |
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.
throw is not a function (not worth fighting with clang-format if it really wants it this way).
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.
Yep, I called this out in my PR description - it's clang-format's doing, and it'll remove any attempt to add a space here.
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Usual disclaimer about how I'm being a bit of a bad kitty 😼 because "grab bag PRs" can be challenging to review and risky to merge. This PR is structured into fine-grained commits for easier reviewing and restricts itself to very low-risk changes (I have separate PRs for fixing libcxx failures).
<optional>: Drop unused requires-expression parameters that appeared only inoperator<=.<yvals.h>:_THROWshould expand with parens.<chrono> #4119. clang-format producesthrow(__VA_ARGS__)with no space, which is annoying but not worth suppressing.<condition_variable>and<thread>should immediately reject/clr:pure.<mutex>) follow this pattern._Stoll,_Stoul,_Stoullare preserved for bincompat. Nobody declares or calls them, including via theCNAMEmacro._Stoll's definition against macros - this isstl/srcwhere we have complete control.<mdspan>:operator[]overloads can attach their open braces.<yvals_core.h>: Improve the_USE_EXTERN_CXX_EVERYWHERE_FOR_STLcomment.extern "C++"as a temporary workaround for#include/importcoexistence #4154, applied without further changes._Cnd_internal_imp_tas the type name is sufficiently clear.// MEOW functionwhereMEOWappears below (without any macroization). Similar rationale to Remove SHOUTY BANNERS #2074 addressing STL: WE SHOULD REMOVE THE SHOUTY COMMENT BANNERS! #306, these comments are counterproductive in a world where editors like VSCode provide easy global search.#else._ITERATOR_DEBUG_LEVELor_M_CEE_PURE, looked imbalanced and were ancient relics of codebase processing.