Skip to content

Commit a621095

Browse files
Toolset update: VS 2022 17.7 Preview 1 (#3711)
* PowerShell 7.3.4. * New pool. * VS 2022 17.7 Preview 1. * Require Clang 16. * Remove workaround for VSO-1753916 'C++23 tuple causes x86chk assertion: !"If lookup found RDSymbol before it should find something this time, too", ParseTree.cpp 10376'. * Remove workarounds for VSO-1799670 "EDG rejects constexpr vector in debug mode with 'attempt to access expired storage' errors, part 3". * Remove workarounds for LLVM-44833 "[concepts] deferred substitution into requirements of class template members not implemented". * [llvm16] Clang has implemented P0960; unskip tests that now pass, and remove workaround in `P2474R2_views_repeat`. * [llvm16] Clang now warns about overriding `/fp:strict` with `-ffp-contract`. Update `floating_point_model_matrix.lst` to silence these warnings. * [llvm16] Fix redeclaration of `adjacent_transform_view` (atomic constraint expressions effectively cannot be reproduced since each utterance is distinct). * [llvm16] Disambiguate `tuple` comparison operators. * [llvm16] Workaround LLVM-62290, which has been fixed for Clang 17, in `<ranges>`. * [llvm16] Remove workarounds for a couple of `TRANSITION, Clang 16` issues in `<ranges>` and `<type_traits>`. * [llvm16] Perma-workaround unfiled clang bug in `P0896R4_views_take`. * [llvm16 followup] Improve arrow comments. * [llvm16 followup] We `_EXPORT_STD` both declarations and definitions. * Disable UBSan to work around GH 3568 "Investigate why Clang/LLVM UBSan doesn't link". * Guard `_addcarry_u64`/`_subborrow_u64` for Clang. * `LDBL_DECIMAL_DIG` is now missing for Clang too. * Although LLVM-46207 is still open, Clang now likes tgmath.h. * Cite LLVM-62096 "Clang complains about concept depending on itself". * Add workaround for LLVM-62762 "32-bit-only misoptimization of printf calls on Windows". * clang-format 16, no manual changes. The changes are almost entirely positive, with no horrible mangling, and limited weirdness around `&`, `&&`, and `*`. No need for manual fixups. * .clang-format: Update link to Clang 16. * .clang-format: Sort defaults, no behavioral changes. * .clang-format: Drop commented-out defaults, no behavioral changes. `BreakBeforeInheritanceComma` and `BreakConstructorInitializersBeforeComma` were never documented and aren't printed out by `-dump-config` anymore. The weird empty `BasedOnStyle` isn't printed out by `-dump-config` anymore. `ConstructorInitializerAllOnOneLineOrOnePerLine` and `AllowAllConstructorInitializersOnNextLine` are now deprecated and aren't printed out by `-dump-config` anymore. * .clang-format: `DeriveLineEnding` and `UseCRLF` were deprecated and fused into `LineEnding`, no behavioral changes. * .clang-format: `AlignTrailingComments` is no longer a bool. Use the new options, no behavioral changes. * .clang-format: `SortUsingDeclarations` (which we didn't customize) is no longer a bool, no behavioral changes. * .clang-format: Add new defaults, no behavioral changes. * .clang-format: `InsertNewlineAtEOF` is new, set it to `true`. Doesn't change any files right now. * .clang-format: `RemoveSemicolon` is new, set it to `true`. * clang-format 16, no manual changes - remove semicolons. --------- Co-authored-by: Casey Carter <[email protected]>
1 parent 71e404b commit a621095

File tree

69 files changed

+485
-604
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+485
-604
lines changed

.clang-format

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Microsoft Corporation.
22
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

4-
# https://releases.llvm.org/15.0.0/tools/clang/docs/ClangFormatStyleOptions.html
4+
# https://releases.llvm.org/16.0.0/tools/clang/docs/ClangFormatStyleOptions.html
55

66
---
77
# Language: Cpp
@@ -42,17 +42,20 @@ AlignConsecutiveMacros: Consecutive
4242
AlignEscapedNewlines: Left
4343
# AlignOperands: Align
4444
AlignOperands: AlignAfterOperator
45-
# AlignTrailingComments: true
46-
AlignTrailingComments: false
45+
# AlignTrailingComments:
46+
# Kind: Always
47+
# OverEmptyLines: 0
48+
AlignTrailingComments:
49+
Kind: Never
4750
# AllowAllArgumentsOnNextLine: true
4851
# AllowAllParametersOfDeclarationOnNextLine: true
49-
# AllowShortEnumsOnASingleLine: true
5052
# AllowShortBlocksOnASingleLine: Never
5153
# AllowShortCaseLabelsOnASingleLine: false
54+
# AllowShortEnumsOnASingleLine: true
5255
# AllowShortFunctionsOnASingleLine: All
5356
AllowShortFunctionsOnASingleLine: Empty
54-
# AllowShortLambdasOnASingleLine: All
5557
# AllowShortIfStatementsOnASingleLine: Never
58+
# AllowShortLambdasOnASingleLine: All
5659
# AllowShortLoopsOnASingleLine: false
5760
# AlwaysBreakAfterDefinitionReturnType: None
5861
# AlwaysBreakAfterReturnType: None
@@ -63,17 +66,18 @@ AlwaysBreakTemplateDeclarations: Yes
6366
# - __capability
6467
# BinPackArguments: true
6568
# BinPackParameters: true
69+
# BitFieldColonSpacing: Both
6670
# BraceWrapping:
6771
# AfterCaseLabel: false
6872
# AfterClass: false
6973
# AfterControlStatement: Never
7074
# AfterEnum: false
75+
# AfterExternBlock: false
7176
# AfterFunction: false
7277
# AfterNamespace: false
7378
# AfterObjCDeclaration: false
7479
# AfterStruct: false
7580
# AfterUnion: false
76-
# AfterExternBlock: false
7781
# BeforeCatch: false
7882
# BeforeElse: false
7983
# BeforeLambdaBody: false
@@ -82,36 +86,30 @@ AlwaysBreakTemplateDeclarations: Yes
8286
# SplitEmptyFunction: true
8387
# SplitEmptyRecord: true
8488
# SplitEmptyNamespace: true
89+
# BreakAfterAttributes: Never
90+
# BreakAfterJavaFieldAnnotations: false
91+
# BreakArrays: true
8592
# BreakBeforeBinaryOperators: None
8693
BreakBeforeBinaryOperators: NonAssignment
8794
# BreakBeforeConceptDeclarations: Always
8895
# BreakBeforeBraces: Attach
89-
# BreakBeforeInheritanceComma: false
90-
# BreakInheritanceList: BeforeColon
96+
# BreakBeforeInlineASMColon: OnlyMultiline
9197
# BreakBeforeTernaryOperators: true
92-
# BreakConstructorInitializersBeforeComma: false
9398
# BreakConstructorInitializers: BeforeColon
94-
# BreakAfterJavaFieldAnnotations: false
99+
# BreakInheritanceList: BeforeColon
95100
# BreakStringLiterals: true
96101
# ColumnLimit: 80
97102
ColumnLimit: 120
98103
# CommentPragmas: '^ IWYU pragma:'
99-
# QualifierAlignment: Leave
100104
# CompactNamespaces: false
101105
# ConstructorInitializerIndentWidth: 4
102106
# ContinuationIndentWidth: 4
103107
# Cpp11BracedListStyle: true
104-
# DeriveLineEnding: true
105-
DeriveLineEnding: false
106108
# DerivePointerAlignment: false
107109
# DisableFormat: false
108110
# EmptyLineAfterAccessModifier: Never
109111
# EmptyLineBeforeAccessModifier: LogicalBlock
110112
# ExperimentalAutoDetectBinPacking: false
111-
# PackConstructorInitializers: BinPack
112-
# BasedOnStyle: ''
113-
# ConstructorInitializerAllOnOneLineOrOnePerLine: false
114-
# AllowAllConstructorInitializersOnNextLine: true
115113
# FixNamespaceComments: true
116114
# ForEachMacros:
117115
# - foreach
@@ -152,24 +150,35 @@ IncludeCategories:
152150
# IncludeIsMainRegex: '(Test)?$'
153151
# IncludeIsMainSourceRegex: ''
154152
# IndentAccessModifiers: false
155-
# IndentCaseLabels: false
156153
# IndentCaseBlocks: false
157154
IndentCaseBlocks: true
155+
# IndentCaseLabels: false
156+
# IndentExternBlock: AfterExternBlock
158157
# IndentGotoLabels: true
159158
# IndentPPDirectives: None
160-
# IndentExternBlock: AfterExternBlock
161159
# IndentRequiresClause: true
162160
# IndentWidth: 2
163161
IndentWidth: 4
164162
# IndentWrappedFunctionNames: false
165163
IndentWrappedFunctionNames: true
166164
# InsertBraces: false
167165
InsertBraces: true
166+
# InsertNewlineAtEOF: false
167+
InsertNewlineAtEOF: true
168168
# InsertTrailingCommas: None
169+
# IntegerLiteralSeparator:
170+
# Binary: 0
171+
# BinaryMinDigits: 0
172+
# Decimal: 0
173+
# DecimalMinDigits: 0
174+
# Hex: 0
175+
# HexMinDigits: 0
169176
# JavaScriptQuotes: Leave
170177
# JavaScriptWrapImports: true
171178
# KeepEmptyLinesAtTheStartOfBlocks: true
172179
# LambdaBodyIndentation: Signature
180+
# LineEnding: DeriveLF
181+
LineEnding: CRLF
173182
# NOTE: MacroBlockBegin/MacroBlockEnd don't work with _CATCH_ALL.
174183
# MacroBlockBegin: ''
175184
# MacroBlockEnd: ''
@@ -182,6 +191,7 @@ NamespaceIndentation: All
182191
# ObjCBreakBeforeNestedBlockParam: true
183192
# ObjCSpaceAfterProperty: false
184193
# ObjCSpaceBeforeProtocolList: true
194+
# PackConstructorInitializers: BinPack
185195
# PenaltyBreakAssignment: 2
186196
# PenaltyBreakBeforeFirstCallParameter: 19
187197
# PenaltyBreakComment: 300
@@ -190,24 +200,29 @@ NamespaceIndentation: All
190200
# PenaltyBreakString: 1000
191201
# PenaltyBreakTemplateDeclaration: 10
192202
# PenaltyExcessCharacter: 1000000
193-
# PenaltyReturnTypeOnItsOwnLine: 60
194203
# PenaltyIndentedWhitespace: 0
204+
# PenaltyReturnTypeOnItsOwnLine: 60
195205
# PointerAlignment: Right
196206
PointerAlignment: Left
197207
# PPIndentWidth: -1
208+
# QualifierAlignment: Leave
198209
# ReferenceAlignment: Pointer
199210
# ReflowComments: true
200211
# RemoveBracesLLVM: false
212+
# RemoveSemicolon: false
213+
RemoveSemicolon: true
201214
# RequiresClausePosition: OwnLine
215+
# RequiresExpressionIndentation: OuterScope
202216
# SeparateDefinitionBlocks: Leave
203217
# ShortNamespaceLines: 1
204218
# SortIncludes: CaseSensitive
205219
# SortJavaStaticImport: Before
206-
# SortUsingDeclarations: true
220+
# SortUsingDeclarations: LexicographicNumeric
207221
# SpaceAfterCStyleCast: false
208222
SpaceAfterCStyleCast: true
209223
# SpaceAfterLogicalNot: false
210224
# SpaceAfterTemplateKeyword: true
225+
# SpaceAroundPointerQualifiers: Default
211226
# SpaceBeforeAssignmentOperators: true
212227
# SpaceBeforeCaseColon: false
213228
# SpaceBeforeCpp11BracedList: false
@@ -227,8 +242,8 @@ SpaceAfterCStyleCast: true
227242
SpaceBeforeParens: Custom
228243
SpaceBeforeParensOptions:
229244
AfterRequiresInClause: true
230-
# SpaceAroundPointerQualifiers: Default
231245
# SpaceBeforeRangeBasedForLoopColon: true
246+
# SpaceBeforeSquareBrackets: false
232247
# SpaceInEmptyBlock: false
233248
# SpaceInEmptyParentheses: false
234249
# SpacesBeforeTrailingComments: 1
@@ -241,8 +256,6 @@ SpaceBeforeParensOptions:
241256
# Maximum: -1
242257
# SpacesInParentheses: false
243258
# SpacesInSquareBrackets: false
244-
# SpaceBeforeSquareBrackets: false
245-
# BitFieldColonSpacing: Both
246259
# Standard: Latest
247260
# StatementAttributeLikeMacros:
248261
# - Q_EMIT
@@ -261,13 +274,11 @@ StatementMacros:
261274
- _EXTERN_C_UNLESS_PURE
262275
- _END_EXTERN_C_UNLESS_PURE
263276
# TabWidth: 8
264-
# UseCRLF: false
265-
UseCRLF: true
266277
# UseTab: Never
267278
# WhitespaceSensitiveMacros:
268-
# - STRINGIZE
269-
# - PP_STRINGIZE
270279
# - BOOST_PP_STRINGIZE
271-
# - NS_SWIFT_NAME
272280
# - CF_SWIFT_NAME
281+
# - NS_SWIFT_NAME
282+
# - PP_STRINGIZE
283+
# - STRINGIZE
273284
...

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem
141141

142142
# How To Build With The Visual Studio IDE
143143

144-
1. Install Visual Studio 2022 17.6 Preview 3 or later.
144+
1. Install Visual Studio 2022 17.7 Preview 1 or later.
145145
* Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer.
146146
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
147147
This will ensure that you're using supported versions of CMake and Ninja.
@@ -157,7 +157,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem
157157

158158
# How To Build With A Native Tools Command Prompt
159159

160-
1. Install Visual Studio 2022 17.6 Preview 3 or later.
160+
1. Install Visual Studio 2022 17.7 Preview 1 or later.
161161
* Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer.
162162
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
163163
This will ensure that you're using supported versions of CMake and Ninja.

azure-devops/provision-image.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if ([string]::IsNullOrEmpty($AdminUserPassword)) {
9191
$PsExecPath = Join-Path $ExtractedPsToolsPath 'PsExec64.exe'
9292

9393
# https://github.com/PowerShell/PowerShell/releases/latest
94-
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.3/PowerShell-7.3.3-win-x64.zip'
94+
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.4/PowerShell-7.3.4-win-x64.zip'
9595
Write-Host "Downloading: $PowerShellZipUrl"
9696
$ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl
9797
$PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe'

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ variables:
99
benchmarkBuildOutputLocation: 'D:\benchmark'
1010

1111
pool:
12-
name: 'StlBuild-2023-04-11T1428-Pool'
12+
name: 'StlBuild-2023-05-16T1204-Pool'
1313
demands: EnableSpotVM -equals true
1414

1515
pr:

stl/inc/__msvc_int128.hpp

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,17 @@ _STD_BEGIN
4343
#if defined(_M_X64) && !defined(_M_ARM64EC) && !defined(_M_CEE_PURE) && !defined(__CUDACC__) \
4444
&& !defined(__INTEL_COMPILER)
4545
#define _STL_128_INTRINSICS 1
46-
#ifdef __clang__ // clang doesn't have _udiv128 / _div128
47-
#define _STL_128_DIV_INTRINSICS 0
48-
#else // ^^^ Clang / other vvv
49-
#define _STL_128_DIV_INTRINSICS 1
50-
#endif // ^^^ detect _udiv128 / _div128 ^^^
46+
#ifdef __clang__
47+
#define _STL_128_ADD_SUB_INTRINSICS 0 // clang doesn't have _addcarry_u64 / _subborrow_u64
48+
#define _STL_128_DIV_INTRINSICS 0 // clang doesn't have _udiv128 / _div128
49+
#else // ^^^ Clang / other compilers vvv
50+
#define _STL_128_ADD_SUB_INTRINSICS 1
51+
#define _STL_128_DIV_INTRINSICS 1
52+
#endif // ^^^ other compilers ^^^
5153
#else // ^^^ intrinsics available / intrinsics unavailable vvv
52-
#define _STL_128_INTRINSICS 0
53-
#define _STL_128_DIV_INTRINSICS 0
54+
#define _STL_128_INTRINSICS 0
55+
#define _STL_128_ADD_SUB_INTRINSICS 0
56+
#define _STL_128_DIV_INTRINSICS 0
5457
#endif // ^^^ intrinsics unavailable ^^^
5558

5659
struct
@@ -111,11 +114,11 @@ struct
111114
static constexpr unsigned char _AddCarry64(
112115
unsigned char _Carry, uint64_t _Left, uint64_t _Right, uint64_t& _Result) noexcept {
113116
// _STL_INTERNAL_CHECK(_Carry < 2);
114-
#if _STL_128_INTRINSICS
117+
#if _STL_128_ADD_SUB_INTRINSICS
115118
if (!_Is_constant_evaluated()) {
116119
return _addcarry_u64(_Carry, _Left, _Right, &_Result);
117120
}
118-
#endif // _STL_128_INTRINSICS
121+
#endif // _STL_128_ADD_SUB_INTRINSICS
119122

120123
const uint64_t _Sum = _Left + _Right + _Carry;
121124
_Result = _Sum;
@@ -125,11 +128,11 @@ struct
125128
static constexpr unsigned char _SubBorrow64(
126129
unsigned char _Carry, uint64_t _Left, uint64_t _Right, uint64_t& _Result) noexcept {
127130
// _STL_INTERNAL_CHECK(_Carry < 2);
128-
#if _STL_128_INTRINSICS
131+
#if _STL_128_ADD_SUB_INTRINSICS
129132
if (!_Is_constant_evaluated()) {
130133
return _subborrow_u64(_Carry, _Left, _Right, &_Result);
131134
}
132-
#endif // _STL_128_INTRINSICS
135+
#endif // _STL_128_ADD_SUB_INTRINSICS
133136

134137
const auto _Difference = _Left - _Right - _Carry;
135138
_Result = _Difference;
@@ -511,7 +514,7 @@ struct
511514
return __qhat;
512515
#else // ^^^ 128-bit intrinsics / no such intrinsics vvv
513516
#if _HAS_CXX20
514-
auto __d = _STD countl_zero(_Den._Word[1]);
517+
auto __d = _STD countl_zero(_Den._Word[1]);
515518
#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv
516519
auto __d = _Countl_zero_fallback(_Den._Word[1]);
517520
#endif // ^^^ !_HAS_CXX20 ^^^
@@ -646,7 +649,7 @@ struct
646649
}
647650
#else // ^^^ 128-bit intrinsics / no such intrinsics vvv
648651
#if _HAS_CXX20
649-
auto __d = _STD countl_zero(_Den._Word[1]);
652+
auto __d = _STD countl_zero(_Den._Word[1]);
650653
#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv
651654
auto __d = _Countl_zero_fallback(_Den._Word[1]);
652655
#endif // ^^^ !_HAS_CXX20 ^^^

stl/inc/__msvc_iter_core.hpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ _EXPORT_STD struct contiguous_iterator_tag : random_access_iterator_tag {};
3434

3535
template <class _Ty>
3636
concept _Dereferenceable = requires(_Ty& __t) {
37-
{ *__t } -> _Can_reference;
38-
};
37+
{ *__t } -> _Can_reference;
38+
};
3939

4040
template <class _Ty>
4141
concept _Has_member_iterator_concept = requires { typename _Ty::iterator_concept; };
@@ -77,8 +77,8 @@ struct incrementable_traits<_Ty> {
7777

7878
template <class _Ty>
7979
concept _Can_difference = requires(const _Ty& __a, const _Ty& __b) {
80-
{ __a - __b } -> integral;
81-
};
80+
{ __a - __b } -> integral;
81+
};
8282

8383
template <class _Ty>
8484
requires (!_Has_member_difference_type<_Ty> && _Can_difference<_Ty>)
@@ -291,10 +291,10 @@ struct _Iter_traits_category3<false> {
291291

292292
template <class _It>
293293
concept _Cpp17_bidi_delta = requires(_It __i) {
294-
{ --__i } -> same_as<_It&>;
295-
{ __i-- } -> convertible_to<const _It&>;
296-
requires same_as<decltype(*__i--), iter_reference_t<_It>>;
297-
};
294+
{ --__i } -> same_as<_It&>;
295+
{ __i-- } -> convertible_to<const _It&>;
296+
requires same_as<decltype(*__i--), iter_reference_t<_It>>;
297+
};
298298

299299
template <bool _Is_forward>
300300
struct _Iter_traits_category2 {
@@ -363,9 +363,9 @@ struct iterator_traits<_Ty*> {
363363

364364
template <class _Ty>
365365
inline constexpr bool _Integer_class = requires {
366-
typename _Ty::_Signed_type;
367-
typename _Ty::_Unsigned_type;
368-
};
366+
typename _Ty::_Signed_type;
367+
typename _Ty::_Unsigned_type;
368+
};
369369

370370
template <class _Ty>
371371
concept _Integer_like = _Is_nonbool_integral<remove_cv_t<_Ty>> || _Integer_class<_Ty>;

0 commit comments

Comments
 (0)