Skip to content
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.7 Preview 1 #3711

Merged
merged 37 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
35e44d2
PowerShell 7.3.4.
StephanTLavavej May 16, 2023
f103373
New pool.
StephanTLavavej May 16, 2023
5495836
VS 2022 17.7 Preview 1.
StephanTLavavej May 16, 2023
91d4994
Require Clang 16.
StephanTLavavej May 16, 2023
eb6b4db
Remove workaround for VSO-1761088 "ICE when using a pack expansion to…
StephanTLavavej May 16, 2023
c26b76b
Remove workaround for VSO-1753916 'C++23 tuple causes x86chk assertio…
StephanTLavavej May 16, 2023
afed425
Remove workarounds for VSO-1799670 "EDG rejects constexpr vector in d…
StephanTLavavej May 16, 2023
989220d
Remove workarounds for LLVM-44833 "[concepts] deferred substitution i…
StephanTLavavej May 16, 2023
82c7cc5
[llvm16] Clang has implemented P0960; unskip tests that now pass, and…
CaseyCarter May 15, 2023
adc5d0c
[llvm16] Clang now warns about overriding `/fp:strict` with `-ffp-con…
CaseyCarter May 15, 2023
2ba8713
[llvm16] Fix redeclaration of `adjacent_transform_view` (atomic const…
CaseyCarter May 15, 2023
4e76078
[llvm16] Disambiguate `tuple` comparison operators.
CaseyCarter May 16, 2023
e99c8cc
[llvm16] Workaround LLVM-62290, which has been fixed for Clang 17, in…
CaseyCarter May 16, 2023
96daa84
[llvm16] Remove workarounds for a couple of `TRANSITION, Clang 16` is…
CaseyCarter May 16, 2023
47d4d1b
[llvm16] Perma-workaround unfiled clang bug in `P0896R4_views_take`.
CaseyCarter May 16, 2023
262b0df
[llvm16 followup] Improve arrow comments.
StephanTLavavej May 16, 2023
f98474b
[llvm16 followup] We `_EXPORT_STD` both declarations and definitions.
StephanTLavavej May 16, 2023
56e867a
Disable UBSan to work around GH 3568 "Investigate why Clang/LLVM UBSa…
StephanTLavavej May 17, 2023
eacf35b
Guard `_addcarry_u64`/`_subborrow_u64` for Clang.
StephanTLavavej May 17, 2023
fd1c890
`LDBL_DECIMAL_DIG` is now missing for Clang too.
StephanTLavavej May 17, 2023
911f2d1
Although LLVM-46207 is still open, Clang now likes tgmath.h.
StephanTLavavej May 17, 2023
8f97457
Cite LLVM-62096 "Clang complains about concept depending on itself".
StephanTLavavej May 17, 2023
8389b2b
Add workaround for LLVM-62762 "32-bit-only misoptimization of printf …
StephanTLavavej May 17, 2023
3fb9f21
clang-format 16, no manual changes.
StephanTLavavej May 17, 2023
d9b5bbe
.clang-format: Update link to Clang 16.
StephanTLavavej May 17, 2023
2535723
.clang-format: Sort defaults, no behavioral changes.
StephanTLavavej May 17, 2023
8621a2c
.clang-format: Drop commented-out defaults, no behavioral changes.
StephanTLavavej May 17, 2023
a3fd2e3
.clang-format: `DeriveLineEnding` and `UseCRLF` were deprecated and f…
StephanTLavavej May 17, 2023
053a797
.clang-format: `AlignTrailingComments` is no longer a bool. Use the n…
StephanTLavavej May 17, 2023
0d2de3f
.clang-format: `SortUsingDeclarations` (which we didn't customize) is…
StephanTLavavej May 17, 2023
bcb2630
.clang-format: Add new defaults, no behavioral changes.
StephanTLavavej May 17, 2023
1bd7350
.clang-format: `InsertNewlineAtEOF` is new, set it to `true`. Doesn't…
StephanTLavavej May 17, 2023
69736fc
.clang-format: `RemoveSemicolon` is new, set it to `true`.
StephanTLavavej May 17, 2023
a87ad68
clang-format 16, no manual changes - remove semicolons.
StephanTLavavej May 17, 2023
7b2fbe5
Revert "Remove workaround for VSO-1761088 "ICE when using a pack expa…
StephanTLavavej May 17, 2023
18bbb58
Skip the tgmath.h test which fails internally.
StephanTLavavej May 18, 2023
31bbb35
Merge branch 'main' into vs17.7p1
CaseyCarter May 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 40 additions & 29 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# https://releases.llvm.org/15.0.0/tools/clang/docs/ClangFormatStyleOptions.html
# https://releases.llvm.org/16.0.0/tools/clang/docs/ClangFormatStyleOptions.html

---
# Language: Cpp
Expand Down Expand Up @@ -42,17 +42,20 @@ AlignConsecutiveMacros: Consecutive
AlignEscapedNewlines: Left
# AlignOperands: Align
AlignOperands: AlignAfterOperator
# AlignTrailingComments: true
AlignTrailingComments: false
# AlignTrailingComments:
# Kind: Always
# OverEmptyLines: 0
AlignTrailingComments:
Kind: Never
# AllowAllArgumentsOnNextLine: true
# AllowAllParametersOfDeclarationOnNextLine: true
# AllowShortEnumsOnASingleLine: true
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortEnumsOnASingleLine: true
# AllowShortFunctionsOnASingleLine: All
AllowShortFunctionsOnASingleLine: Empty
# AllowShortLambdasOnASingleLine: All
# AllowShortIfStatementsOnASingleLine: Never
# AllowShortLambdasOnASingleLine: All
# AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
# AlwaysBreakAfterReturnType: None
Expand All @@ -63,17 +66,18 @@ AlwaysBreakTemplateDeclarations: Yes
# - __capability
# BinPackArguments: true
# BinPackParameters: true
# BitFieldColonSpacing: Both
# BraceWrapping:
# AfterCaseLabel: false
# AfterClass: false
# AfterControlStatement: Never
# AfterEnum: false
# AfterExternBlock: false
# AfterFunction: false
# AfterNamespace: false
# AfterObjCDeclaration: false
# AfterStruct: false
# AfterUnion: false
# AfterExternBlock: false
# BeforeCatch: false
# BeforeElse: false
# BeforeLambdaBody: false
Expand All @@ -82,36 +86,30 @@ AlwaysBreakTemplateDeclarations: Yes
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
# BreakAfterAttributes: Never
# BreakAfterJavaFieldAnnotations: false
# BreakArrays: true
# BreakBeforeBinaryOperators: None
BreakBeforeBinaryOperators: NonAssignment
# BreakBeforeConceptDeclarations: Always
# BreakBeforeBraces: Attach
# BreakBeforeInheritanceComma: false
# BreakInheritanceList: BeforeColon
# BreakBeforeInlineASMColon: OnlyMultiline
# BreakBeforeTernaryOperators: true
# BreakConstructorInitializersBeforeComma: false
# BreakConstructorInitializers: BeforeColon
# BreakAfterJavaFieldAnnotations: false
# BreakInheritanceList: BeforeColon
# BreakStringLiterals: true
# ColumnLimit: 80
ColumnLimit: 120
# CommentPragmas: '^ IWYU pragma:'
# QualifierAlignment: Leave
# CompactNamespaces: false
# ConstructorInitializerIndentWidth: 4
# ContinuationIndentWidth: 4
# Cpp11BracedListStyle: true
# DeriveLineEnding: true
DeriveLineEnding: false
# DerivePointerAlignment: false
# DisableFormat: false
# EmptyLineAfterAccessModifier: Never
# EmptyLineBeforeAccessModifier: LogicalBlock
# ExperimentalAutoDetectBinPacking: false
# PackConstructorInitializers: BinPack
# BasedOnStyle: ''
# ConstructorInitializerAllOnOneLineOrOnePerLine: false
# AllowAllConstructorInitializersOnNextLine: true
# FixNamespaceComments: true
# ForEachMacros:
# - foreach
Expand Down Expand Up @@ -152,24 +150,35 @@ IncludeCategories:
# IncludeIsMainRegex: '(Test)?$'
# IncludeIsMainSourceRegex: ''
# IndentAccessModifiers: false
# IndentCaseLabels: false
# IndentCaseBlocks: false
IndentCaseBlocks: true
# IndentCaseLabels: false
# IndentExternBlock: AfterExternBlock
# IndentGotoLabels: true
# IndentPPDirectives: None
# IndentExternBlock: AfterExternBlock
# IndentRequiresClause: true
# IndentWidth: 2
IndentWidth: 4
# IndentWrappedFunctionNames: false
IndentWrappedFunctionNames: true
# InsertBraces: false
InsertBraces: true
# InsertNewlineAtEOF: false
InsertNewlineAtEOF: true
# InsertTrailingCommas: None
# IntegerLiteralSeparator:
# Binary: 0
# BinaryMinDigits: 0
# Decimal: 0
# DecimalMinDigits: 0
# Hex: 0
# HexMinDigits: 0
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
# KeepEmptyLinesAtTheStartOfBlocks: true
# LambdaBodyIndentation: Signature
# LineEnding: DeriveLF
LineEnding: CRLF
# NOTE: MacroBlockBegin/MacroBlockEnd don't work with _CATCH_ALL.
# MacroBlockBegin: ''
# MacroBlockEnd: ''
Expand All @@ -182,6 +191,7 @@ NamespaceIndentation: All
# ObjCBreakBeforeNestedBlockParam: true
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
# PackConstructorInitializers: BinPack
# PenaltyBreakAssignment: 2
# PenaltyBreakBeforeFirstCallParameter: 19
# PenaltyBreakComment: 300
Expand All @@ -190,24 +200,29 @@ NamespaceIndentation: All
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
# PenaltyReturnTypeOnItsOwnLine: 60
# PenaltyIndentedWhitespace: 0
# PenaltyReturnTypeOnItsOwnLine: 60
# PointerAlignment: Right
PointerAlignment: Left
# PPIndentWidth: -1
# QualifierAlignment: Leave
# ReferenceAlignment: Pointer
# ReflowComments: true
# RemoveBracesLLVM: false
# RemoveSemicolon: false
RemoveSemicolon: true
# RequiresClausePosition: OwnLine
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave
# ShortNamespaceLines: 1
# SortIncludes: CaseSensitive
# SortJavaStaticImport: Before
# SortUsingDeclarations: true
# SortUsingDeclarations: LexicographicNumeric
# SpaceAfterCStyleCast: false
SpaceAfterCStyleCast: true
# SpaceAfterLogicalNot: false
# SpaceAfterTemplateKeyword: true
# SpaceAroundPointerQualifiers: Default
# SpaceBeforeAssignmentOperators: true
# SpaceBeforeCaseColon: false
# SpaceBeforeCpp11BracedList: false
Expand All @@ -227,8 +242,8 @@ SpaceAfterCStyleCast: true
SpaceBeforeParens: Custom
SpaceBeforeParensOptions:
AfterRequiresInClause: true
# SpaceAroundPointerQualifiers: Default
# SpaceBeforeRangeBasedForLoopColon: true
# SpaceBeforeSquareBrackets: false
# SpaceInEmptyBlock: false
# SpaceInEmptyParentheses: false
# SpacesBeforeTrailingComments: 1
Expand All @@ -241,8 +256,6 @@ SpaceBeforeParensOptions:
# Maximum: -1
# SpacesInParentheses: false
# SpacesInSquareBrackets: false
# SpaceBeforeSquareBrackets: false
# BitFieldColonSpacing: Both
# Standard: Latest
# StatementAttributeLikeMacros:
# - Q_EMIT
Expand All @@ -261,13 +274,11 @@ StatementMacros:
- _EXTERN_C_UNLESS_PURE
- _END_EXTERN_C_UNLESS_PURE
# TabWidth: 8
# UseCRLF: false
UseCRLF: true
# UseTab: Never
# WhitespaceSensitiveMacros:
# - STRINGIZE
# - PP_STRINGIZE
# - BOOST_PP_STRINGIZE
# - NS_SWIFT_NAME
# - CF_SWIFT_NAME
# - NS_SWIFT_NAME
# - PP_STRINGIZE
# - STRINGIZE
...
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem

# How To Build With The Visual Studio IDE

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

# How To Build With A Native Tools Command Prompt

1. Install Visual Studio 2022 17.6 Preview 3 or later.
1. Install Visual Studio 2022 17.7 Preview 1 or later.
* Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer.
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
This will ensure that you're using supported versions of CMake and Ninja.
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ if ([string]::IsNullOrEmpty($AdminUserPassword)) {
$PsExecPath = Join-Path $ExtractedPsToolsPath 'PsExec64.exe'

# https://github.com/PowerShell/PowerShell/releases/latest
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.3/PowerShell-7.3.3-win-x64.zip'
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.4/PowerShell-7.3.4-win-x64.zip'
Write-Host "Downloading: $PowerShellZipUrl"
$ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl
$PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe'
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ variables:
benchmarkBuildOutputLocation: 'D:\benchmark'

pool:
name: 'StlBuild-2023-04-11T1428-Pool'
name: 'StlBuild-2023-05-16T1204-Pool'
demands: EnableSpotVM -equals true

pr:
Expand Down
29 changes: 16 additions & 13 deletions stl/inc/__msvc_int128.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,17 @@ _STD_BEGIN
#if defined(_M_X64) && !defined(_M_ARM64EC) && !defined(_M_CEE_PURE) && !defined(__CUDACC__) \
&& !defined(__INTEL_COMPILER)
#define _STL_128_INTRINSICS 1
#ifdef __clang__ // clang doesn't have _udiv128 / _div128
#define _STL_128_DIV_INTRINSICS 0
#else // ^^^ Clang / other vvv
#define _STL_128_DIV_INTRINSICS 1
#endif // ^^^ detect _udiv128 / _div128 ^^^
#ifdef __clang__
#define _STL_128_ADD_SUB_INTRINSICS 0 // clang doesn't have _addcarry_u64 / _subborrow_u64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming nit: these are 64-bit intrinsics, not 128-bit intrinsics.
More serious: This is a lie. I can reproduce the issue with the clang in 17.7p1, but not when I self-install 16.0.1. Something has gone awry in the VS clang tree, and we need to run it down.

I don't really care about the naming given that I suspect this will be a temporary workaround. I've filed #3713 to investigate this.

#define _STL_128_DIV_INTRINSICS 0 // clang doesn't have _udiv128 / _div128
#else // ^^^ Clang / other compilers vvv
#define _STL_128_ADD_SUB_INTRINSICS 1
#define _STL_128_DIV_INTRINSICS 1
#endif // ^^^ other compilers ^^^
#else // ^^^ intrinsics available / intrinsics unavailable vvv
#define _STL_128_INTRINSICS 0
#define _STL_128_DIV_INTRINSICS 0
#define _STL_128_INTRINSICS 0
#define _STL_128_ADD_SUB_INTRINSICS 0
#define _STL_128_DIV_INTRINSICS 0
#endif // ^^^ intrinsics unavailable ^^^

struct
Expand Down Expand Up @@ -111,11 +114,11 @@ struct
static constexpr unsigned char _AddCarry64(
unsigned char _Carry, uint64_t _Left, uint64_t _Right, uint64_t& _Result) noexcept {
// _STL_INTERNAL_CHECK(_Carry < 2);
#if _STL_128_INTRINSICS
#if _STL_128_ADD_SUB_INTRINSICS
if (!_Is_constant_evaluated()) {
return _addcarry_u64(_Carry, _Left, _Right, &_Result);
}
#endif // _STL_128_INTRINSICS
#endif // _STL_128_ADD_SUB_INTRINSICS

const uint64_t _Sum = _Left + _Right + _Carry;
_Result = _Sum;
Expand All @@ -125,11 +128,11 @@ struct
static constexpr unsigned char _SubBorrow64(
unsigned char _Carry, uint64_t _Left, uint64_t _Right, uint64_t& _Result) noexcept {
// _STL_INTERNAL_CHECK(_Carry < 2);
#if _STL_128_INTRINSICS
#if _STL_128_ADD_SUB_INTRINSICS
if (!_Is_constant_evaluated()) {
return _subborrow_u64(_Carry, _Left, _Right, &_Result);
}
#endif // _STL_128_INTRINSICS
#endif // _STL_128_ADD_SUB_INTRINSICS

const auto _Difference = _Left - _Right - _Carry;
_Result = _Difference;
Expand Down Expand Up @@ -511,7 +514,7 @@ struct
return __qhat;
#else // ^^^ 128-bit intrinsics / no such intrinsics vvv
#if _HAS_CXX20
auto __d = _STD countl_zero(_Den._Word[1]);
auto __d = _STD countl_zero(_Den._Word[1]);
#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv
auto __d = _Countl_zero_fallback(_Den._Word[1]);
#endif // ^^^ !_HAS_CXX20 ^^^
Expand Down Expand Up @@ -646,7 +649,7 @@ struct
}
#else // ^^^ 128-bit intrinsics / no such intrinsics vvv
#if _HAS_CXX20
auto __d = _STD countl_zero(_Den._Word[1]);
auto __d = _STD countl_zero(_Den._Word[1]);
#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv
auto __d = _Countl_zero_fallback(_Den._Word[1]);
#endif // ^^^ !_HAS_CXX20 ^^^
Expand Down
22 changes: 11 additions & 11 deletions stl/inc/__msvc_iter_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ _EXPORT_STD struct contiguous_iterator_tag : random_access_iterator_tag {};

template <class _Ty>
concept _Dereferenceable = requires(_Ty& __t) {
{ *__t } -> _Can_reference;
};
{ *__t } -> _Can_reference;
};

template <class _Ty>
concept _Has_member_iterator_concept = requires { typename _Ty::iterator_concept; };
Expand Down Expand Up @@ -77,8 +77,8 @@ struct incrementable_traits<_Ty> {

template <class _Ty>
concept _Can_difference = requires(const _Ty& __a, const _Ty& __b) {
{ __a - __b } -> integral;
};
{ __a - __b } -> integral;
};

template <class _Ty>
requires (!_Has_member_difference_type<_Ty> && _Can_difference<_Ty>)
Expand Down Expand Up @@ -291,10 +291,10 @@ struct _Iter_traits_category3<false> {

template <class _It>
concept _Cpp17_bidi_delta = requires(_It __i) {
{ --__i } -> same_as<_It&>;
{ __i-- } -> convertible_to<const _It&>;
requires same_as<decltype(*__i--), iter_reference_t<_It>>;
};
{ --__i } -> same_as<_It&>;
{ __i-- } -> convertible_to<const _It&>;
requires same_as<decltype(*__i--), iter_reference_t<_It>>;
};

template <bool _Is_forward>
struct _Iter_traits_category2 {
Expand Down Expand Up @@ -363,9 +363,9 @@ struct iterator_traits<_Ty*> {

template <class _Ty>
inline constexpr bool _Integer_class = requires {
typename _Ty::_Signed_type;
typename _Ty::_Unsigned_type;
};
typename _Ty::_Signed_type;
typename _Ty::_Unsigned_type;
};

template <class _Ty>
concept _Integer_like = _Is_nonbool_integral<remove_cv_t<_Ty>> || _Integer_class<_Ty>;
Expand Down
Loading