-
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
Toolset update: VS 2022 17.12 Preview 2, Clang 18.1.8 #4947
Conversation
…warning-option -Wno-overriding-t-option`. GH 4452 originally added this.
…own-warning-option`.
…etc. will be constexpr.
Comment my .clang-format update process. Accept defaults, except for: * Change BreakAfterAttributes from Leave to Never (the old default).
…rouble than it's worth.
…ept common_with`.
Use BASIC-style priorities: 10 for yvals/yvals_core, 20 for normal headers, 30 for Windows headers (with fine-grained SortPriority), and 40 for test headers. Mention (yvals|yvals_core) to be more searchable. userenv.h wasn't being included (anymore?). winioctl.h should be spelled lowercase. Make the regex for __msvc_MEOW.hpp clearer (we have no other double-underscore headers) and mention it in priority order as there's no chance it'll grab matches first. Add a rule to sort initguid.h first, similar to how winioctl.h sorts last.
…d `_Adjacent_transform_constraints` that we thought was LLVM-61763.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
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.
The clang-format improvements are really nice. I still hate what it does with defaulted or deleted special member functions with trailing-requires-clauses, but almost every other change is an improvement.
@@ -97,7 +97,8 @@ struct _Default_allocate_traits { | |||
#ifdef __clang__ // Clang and MSVC implement P0784R7 differently; see GH-1532 | |||
_CONSTEXPR20 | |||
#endif // defined(__clang__) | |||
void* _Allocate(const size_t _Bytes) { | |||
void* | |||
_Allocate(const size_t _Bytes) { |
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.
These two occurrences are unfortunate, but not worth blocking the PR over. I'll experiment and see if I can find an improvement.
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.
Agreed, thanks.
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Hi, do you maintain a list where it is specified which toolset version requires which minimum clang version? I dont want to get errors like this "Unexpected compiler version, expected Clang 18.0.0 or newer." all of a sudden. |
We didn't, but I've just scraped the history and added the required Clang version (note that it's always the Clang that ships with Visual Studio) to the notes in https://github.com/microsoft/STL/wiki/Macro-_MSVC_STL_UPDATE, at least going back as far as we have GitHub history. |
Fixes #1586.
📜 Changelog
📝 Code Format Overhaul
clang-format 18 has noticeably improved its handling of concepts and variable templates. I was able to remove lots of forced wrapping and complete suppression, while needing very few manual adjustments.
As always, the goal is to rely on clang-format to achieve consistency and general readability, not pixel-perfection. I reviewed all of the regen changes, and manually adjusted the ones I thought were obnoxious. Similarly, I removed clang-format suppression when I thought the result was reasonable, even if it was a significant appearance change. We should strive to rely on clang-format for the vast majority of the codebase, giving it only gentle nudges with forced wrapping, and resorting to suppression only when it wants to do something egregious or we need to do something specific for readability or to stay in sync with external sources.
I also explicitly documented my clang-format update process, so we have one less tacit set of steps to perform.
⚙️ Commits
explicit
specifier is checked too early in constrained constructor llvm/llvm-project#59827 was fixed by Clang 18.-Wno-overriding-option
, so drop-Wno-unknown-warning-option -Wno-overriding-t-option
.-Wno-nan-infinity-disabled
, so drop-Wno-unknown-warning-option
.__builtin_isgreater
etc. will be constexpr.<concepts>
down toconcept common_with
.<Windows.h>
with correct capitalization.__msvc_MEOW.hpp
clearer (we have no other double-underscore headers) and mention it in priority order as there's no chance it'll grab matches first.😻 Help wanted!
_Zip_transform_constraints
and_Adjacent_transform_constraints
that we thought was [clang-16 regression] Declaration of a constrained friend class inside of a class template causes compile error llvm/llvm-project#61763. If anyone can properly reduce and report this, I would be a grateful kitty.✅ STL-ASan-CI passed
On the first try! https://dev.azure.com/vclibs/STL/_build/results?buildId=17504&view=results