-
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
Various cleanups #4230
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.
@@ -452,7 +451,7 @@ class _CRTIMP2_PURE_IMPORT _EmptyLockit { // empty lock class used for bin compa | |||
#define _CATCH_END } | |||
|
|||
#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>
:_THROW
should 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
,_Stoull
are preserved for bincompat. Nobody declares or calls them, including via theCNAME
macro._Stoll
's definition against macros - this isstl/src
where we have complete control.<mdspan>
:operator[]
overloads can attach their open braces.<yvals_core.h>
: Improve the_USE_EXTERN_CXX_EVERYWHERE_FOR_STL
comment.extern "C++"
as a temporary workaround for#include
/import
coexistence #4154, applied without further changes._Cnd_internal_imp_t
as the type name is sufficiently clear.// MEOW function
whereMEOW
appears 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_LEVEL
or_M_CEE_PURE
, looked imbalanced and were ancient relics of codebase processing.