Skip to content

Commit 6cb175d

Browse files
Toolset update: VS 2022 17.12 Preview 2, Clang 18.1.8 (#4947)
1 parent ab20dbd commit 6cb175d

File tree

102 files changed

+2259
-2406
lines changed

Some content is hidden

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

102 files changed

+2259
-2406
lines changed

.clang-format

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

4-
# https://releases.llvm.org/17.0.1/tools/clang/docs/ClangFormatStyleOptions.html
4+
# https://releases.llvm.org/18.1.8/tools/clang/docs/ClangFormatStyleOptions.html
5+
6+
# To update this .clang-format file for a new clang-format version:
7+
# 1. Update the documentation link above.
8+
# 2. Copy the output of `clang-format -dump-config` into a temporary file.
9+
# a. Comment out all of its lines.
10+
# b. Uncomment `BasedOnStyle: LLVM`.
11+
# 3. Compare that temporary file to this .clang-format file.
12+
# 4. Adjust this .clang-format file to record new and updated options.
13+
# a. Read the new documentation to understand such changes.
14+
# 5. The goal is for the comparison from the temporary file to this .clang-format file to be pure additions (green).
15+
# a. That is, comments here are recording the defaults, while added lines are our customized settings.
516

617
---
718
# Language: Cpp
@@ -11,31 +22,34 @@ AccessModifierOffset: -4
1122
# AlignAfterOpenBracket: Align
1223
AlignAfterOpenBracket: DontAlign
1324
# AlignArrayOfStructures: None
14-
# TRANSITION, LLVM-51935 (try using AlignArrayOfStructures after this crash is fixed)
1525
# AlignConsecutiveAssignments:
1626
# Enabled: false
1727
# AcrossEmptyLines: false
1828
# AcrossComments: false
1929
# AlignCompound: false
30+
# AlignFunctionPointers: false
2031
# PadOperators: true
2132
AlignConsecutiveAssignments: Consecutive
2233
# AlignConsecutiveBitFields:
2334
# Enabled: false
2435
# AcrossEmptyLines: false
2536
# AcrossComments: false
2637
# AlignCompound: false
38+
# AlignFunctionPointers: false
2739
# PadOperators: false
2840
# AlignConsecutiveDeclarations:
2941
# Enabled: false
3042
# AcrossEmptyLines: false
3143
# AcrossComments: false
3244
# AlignCompound: false
45+
# AlignFunctionPointers: false
3346
# PadOperators: false
3447
# AlignConsecutiveMacros:
3548
# Enabled: false
3649
# AcrossEmptyLines: false
3750
# AcrossComments: false
3851
# AlignCompound: false
52+
# AlignFunctionPointers: false
3953
# PadOperators: false
4054
AlignConsecutiveMacros: Consecutive
4155
# AlignConsecutiveShortCaseStatements:
@@ -54,8 +68,11 @@ AlignTrailingComments:
5468
Kind: Never
5569
# AllowAllArgumentsOnNextLine: true
5670
# AllowAllParametersOfDeclarationOnNextLine: true
71+
# AllowBreakBeforeNoexceptSpecifier: Never
72+
AllowBreakBeforeNoexceptSpecifier: OnlyWithParen
5773
# AllowShortBlocksOnASingleLine: Never
5874
# AllowShortCaseLabelsOnASingleLine: false
75+
# AllowShortCompoundRequirementOnASingleLine: true
5976
# AllowShortEnumsOnASingleLine: true
6077
# AllowShortFunctionsOnASingleLine: All
6178
AllowShortFunctionsOnASingleLine: Empty
@@ -91,7 +108,9 @@ AlwaysBreakTemplateDeclarations: Yes
91108
# SplitEmptyFunction: true
92109
# SplitEmptyRecord: true
93110
# SplitEmptyNamespace: true
94-
# BreakAfterAttributes: Never
111+
# BreakAdjacentStringLiterals: true
112+
# BreakAfterAttributes: Leave
113+
BreakAfterAttributes: Never
95114
# BreakAfterJavaFieldAnnotations: false
96115
# BreakArrays: true
97116
# BreakBeforeBinaryOperators: None
@@ -138,20 +157,23 @@ IncludeBlocks: Regroup
138157
# SortPriority: 0
139158
# CaseSensitive: false
140159
IncludeCategories:
141-
- Regex: '^<yvals(_core)?\.h>$'
142-
Priority: 1
143-
- Regex: '^<(Windows|userenv)\.h>$'
144-
Priority: 3
145-
SortPriority: 3
146-
- Regex: '^<WinIoCtl\.h>$'
147-
Priority: 3
148-
SortPriority: 4
149-
- Regex: '^<__.*\.hpp>$'
150-
Priority: 2
160+
- Regex: '^<(yvals|yvals_core)\.h>$'
161+
Priority: 10
162+
- Regex: '^<__msvc_.*\.hpp>$'
163+
Priority: 20
164+
- Regex: '^<initguid\.h>$' # <initguid.h> should be included before any header that includes <guiddef.h>
165+
Priority: 30
166+
SortPriority: 30
167+
- Regex: '^<(DbgEng|DbgHelp|Shlwapi|Windows)\.h>$'
168+
Priority: 30
169+
SortPriority: 31
170+
- Regex: '^<winioctl\.h>$'
171+
Priority: 30
172+
SortPriority: 32
151173
- Regex: '\.hpp[>"]$'
152-
Priority: 5
174+
Priority: 40
153175
- Regex: '.*'
154-
Priority: 2
176+
Priority: 20
155177
# IncludeIsMainRegex: '(Test)?$'
156178
# IncludeIsMainSourceRegex: ''
157179
# IndentAccessModifiers: false
@@ -203,6 +225,7 @@ NamespaceIndentation: All
203225
# PenaltyBreakComment: 300
204226
# PenaltyBreakFirstLessLess: 120
205227
# PenaltyBreakOpenParenthesis: 0
228+
# PenaltyBreakScopeResolution: 500
206229
# PenaltyBreakString: 1000
207230
# PenaltyBreakTemplateDeclaration: 10
208231
# PenaltyExcessCharacter: 1000000
@@ -222,6 +245,7 @@ RemoveSemicolon: true
222245
# RequiresExpressionIndentation: OuterScope
223246
# SeparateDefinitionBlocks: Leave
224247
# ShortNamespaceLines: 1
248+
# SkipMacroDefinitionBody: false
225249
# SortIncludes: CaseSensitive
226250
# SortJavaStaticImport: Before
227251
# SortUsingDeclarations: LexicographicNumeric
@@ -244,6 +268,7 @@ SpaceAfterCStyleCast: true
244268
# AfterFunctionDeclarationName: false
245269
# AfterIfMacros: true
246270
# AfterOverloadedOperator: false
271+
# AfterPlacementOperator: true
247272
# AfterRequiresInClause: false
248273
# AfterRequiresInExpression: false
249274
# BeforeNonEmptyParentheses: false

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.12 Preview 1 or later.
144+
1. Install Visual Studio 2022 17.12 Preview 2 or later.
145145
* Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer.
146146
* Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer
147147
if you would like to build the ARM64/ARM64EC target.
@@ -160,7 +160,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem
160160

161161
# How To Build With A Native Tools Command Prompt
162162

163-
1. Install Visual Studio 2022 17.12 Preview 1 or later.
163+
1. Install Visual Studio 2022 17.12 Preview 2 or later.
164164
* Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer.
165165
* Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer
166166
if you would like to build the ARM64/ARM64EC target.

azure-devops/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
variables:
77
- name: poolName
8-
value: 'StlBuild-2024-08-14T0018-Pool'
8+
value: 'StlBuild-2024-09-10T1506-Pool'
99
readonly: true
1010
- name: poolDemands
1111
value: 'EnableSpotVM -equals false'

azure-devops/provision-image.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ foreach ($workload in $VisualStudioWorkloads) {
4040
}
4141

4242
# https://github.com/PowerShell/PowerShell/releases/latest
43-
$PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.4.4/PowerShell-7.4.4-win-x64.msi'
43+
$PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.4.5/PowerShell-7.4.5-win-x64.msi'
4444
$PowerShellArgs = @('/quiet', '/norestart')
4545

46-
$PythonUrl = 'https://www.python.org/ftp/python/3.12.5/python-3.12.5-amd64.exe'
46+
$PythonUrl = 'https://www.python.org/ftp/python/3.12.6/python-3.12.6-amd64.exe'
4747
$PythonArgs = @('/quiet', 'InstallAllUsers=1', 'PrependPath=1', 'CompileAll=1', 'Include_doc=0')
4848

4949
$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_551.61_windows.exe'

stl/inc/__msvc_bit_utils.hpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -127,45 +127,18 @@ _NODISCARD int _Checked_x86_x64_countl_zero(const _Ty _Val) noexcept {
127127
#endif // (defined(_M_IX86) && !defined(_M_HYBRID_X86_ARM64)) || (defined(_M_X64) && !defined(_M_ARM64EC))
128128

129129
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) || defined(_M_HYBRID_X86_ARM64)
130-
#ifdef __clang__ // TRANSITION, GH-1586
131-
_NODISCARD constexpr int _Clang_arm_arm64_countl_zero(const unsigned short _Val) {
132-
return __builtin_clzs(_Val);
133-
}
134-
135-
_NODISCARD constexpr int _Clang_arm_arm64_countl_zero(const unsigned int _Val) {
136-
return __builtin_clz(_Val);
137-
}
138-
139-
_NODISCARD constexpr int _Clang_arm_arm64_countl_zero(const unsigned long _Val) {
140-
return __builtin_clzl(_Val);
141-
}
142-
143-
_NODISCARD constexpr int _Clang_arm_arm64_countl_zero(const unsigned long long _Val) {
144-
return __builtin_clzll(_Val);
145-
}
146-
#endif // TRANSITION, GH-1586
147-
148130
template <class _Ty>
149131
_NODISCARD int _Checked_arm_arm64_countl_zero(const _Ty _Val) noexcept {
150132
constexpr int _Digits = _Unsigned_integer_digits<_Ty>;
151133
if (_Val == 0) {
152134
return _Digits;
153135
}
154136

155-
#ifdef __clang__ // TRANSITION, GH-1586
156-
if constexpr (is_same_v<remove_cv_t<_Ty>, unsigned char>) {
157-
return _Clang_arm_arm64_countl_zero(static_cast<unsigned short>(_Val))
158-
- (_Unsigned_integer_digits<unsigned short> - _Digits);
159-
} else {
160-
return _Clang_arm_arm64_countl_zero(_Val);
161-
}
162-
#else // ^^^ workaround / no workaround vvv
163137
if constexpr (_Digits <= 32) {
164138
return static_cast<int>(_CountLeadingZeros(_Val)) - (_Unsigned_integer_digits<unsigned long> - _Digits);
165139
} else {
166140
return static_cast<int>(_CountLeadingZeros64(_Val));
167141
}
168-
#endif // ^^^ no workaround ^^^
169142
}
170143
#endif // defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) || defined(_M_HYBRID_X86_ARM64)
171144
#endif // _HAS_COUNTL_ZERO_INTRINSICS

0 commit comments

Comments
 (0)