Toolset update: VS 2022 17.12 Preview 2, Clang 18.1.8 by StephanTLavavej · Pull Request #4947 · microsoft/STL (original) (raw)
Fixes #1586.
📜 Changelog
- Code cleanups:
- Removed compiler bug workarounds.
- Infrastructure improvements:
- Updated dependencies.
* Updated build compiler to VS 2022 17.12 Preview 2.
* Updated Clang to 18.1.8 (now required).
* Updated Python to 3.12.6.
- Updated dependencies.
📝 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
- PowerShell 7.4.5.
- Python 3.12.6.
- New pool.
- VS 2022 17.12 Preview 2. (Still not updating yvals_core.h because the internal toolset has not yet been updated)
- Clang 18.1.8 (we now require Clang 18).
- Remove workarounds for VSO-2170500 (C1XX type trait optimization).
- [Clang][concepts] Conditional explicit specifier is checked too early in constrained constructor llvm/llvm-project#59827 was fixed by Clang 18.
- Request LLVM to implement _CountLeadingZeros and _CountLeadingZeros64 when targeting ARM/ARM64 #1586 was fixed by Clang 18.
- Clang 18 understands
-Wno-overriding-option
, so drop-Wno-unknown-warning-option -Wno-overriding-t-option
.- Test updates for LLVM18 #4452 originally added this.
- Clang 18 understands
-Wno-nan-infinity-disabled
, so drop-Wno-unknown-warning-option
. - Add 'TRANSITION, Clang 20' comment noting that
__builtin_isgreater
etc. will be constexpr. - static lambda call operator is not convertible to function pointer on win32 llvm/llvm-project#62594 was fixed by Clang 18.
- Clang 18 fixed a bug with static call operators.
- Expect clang-format 18.1.8.
- Update .clang-format.
- Comment my .clang-format update process.
- Accept defaults, except for:
* Change BreakAfterAttributes from Leave to Never (the old default).
- Regen clang-format, no manual changes.
- Change AllowBreakBeforeNoexceptSpecifier from Never to OnlyWithParen.
- Regen clang-format, no manual changes.
- LLVM-51935 clang-format-13 crashes with AlignArrayOfStructures llvm/llvm-project#51277 was fixed a while ago, but AlignArrayOfStructures appears to be more trouble than it's worth.
- Manual: Add parens to avoid spaces around arrow operator.
- Manual: Detach comment.
- Manual: Add forced wrapping before trailing return types.
- Manual: Remove forced wrapping.
- Manual: Remove lots of clang-format suppression.
- Manual: Remove clang-format suppression and introduce parens.
- Manual: Shrink clang-format suppression in
<concepts>
down toconcept common_with
. - Comment: Mention
<Windows.h>
with correct capitalization. - Overhaul header sorting.
- 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.
- Add newlines to save one column and stay within 120.
😻 Help wanted!
- Clang 18 didn't (completely?) fix the bug affecting
_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