Skip to content

[vs2017] Adapt some variadic template aliases to not trip MSVC 2017. #37284

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

Merged

Conversation

drodriguez
Copy link
Contributor

@drodriguez drodriguez commented May 6, 2021

It seems that MSVC 2017 trips parsing an using of an using of a variadic
template. Removing one level of using seems to work fine. A preprocessor
macro allows to keep using the same syntax in both MSVC 2017 and other
compilers without making a lot of a mess.

I think this might have been uncovered by landing swiftlang/llvm-project#2898
when it was picked up by the auto-merger for the swift/main branch.
I think this was not a problem until now, because Metadata.h was
compiled using the just compiled Clang until now. LLDB is compiled using
MSVC in Windows.

Windows VS2017 CI: https://ci-external.swift.org/job/oss-swift-windows-x86_64/
First failing: https://ci-external.swift.org/job/oss-swift-windows-x86_64/7448/ (might disappear)
Last failure until now: https://ci-external.swift.org/job/oss-swift-windows-x86_64/7462/

/cc @bulbazord @compnerd

It seems that MSVC 2017 trips parsing an using of a using of a variadic
template. Removing one level of using seems to work fine. A preprocessor
macro allows to keep using the same syntax in both MSVC 2017 and other
compilers without making a lot of a mess.

I think this might have been uncovered by landing swiftlang/llvm-project#2898
when it was picked up by the auto-merger for the swift/main branch.
I think this was not a problem until now, because Metadata.h was
compiled using the just compiled Clang until now. LLDB is compiled using
MSVC in Windows.
@drodriguez drodriguez requested a review from DougGregor May 6, 2021 03:02
@drodriguez
Copy link
Contributor Author

@swift-ci please smoke test

@drodriguez
Copy link
Contributor Author

Merging to avoid the brokenness.

@drodriguez drodriguez merged commit a1748cb into swiftlang:main May 7, 2021
@drodriguez drodriguez deleted the msvc-2017-variadic-template-hack branch May 7, 2021 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant