Skip to content

Basic: silence MSVC pedantic warning (NFC) #25207

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
merged 1 commit into from
Jun 2, 2019

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Jun 2, 2019

The constructor here required multiple user-defined conversions which is
not exactly pedantically correct. Add an explicit indicator that the
constructor being invoked is the StringRef constructor to convert the
SmallString to a StringRef which can then be implicitly converted to
the Optional<StringRef>. This silences a MSVC warning (clang should
catch this with -pedantic).

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

The constructor here required multiple user-defined conversions which is
not exactly pedantically correct.  Add an explicit indicator that the
constructor being invoked is the `StringRef` constructor to convert the
`SmallString` to a `StringRef` which can then be implicitly converted to
the `Optional<StringRef>`.  This silences a MSVC warning (clang should
catch this with `-pedantic`).
@compnerd
Copy link
Member Author

compnerd commented Jun 2, 2019

@swift-ci please test and merge

@compnerd compnerd merged commit 9c9fd35 into swiftlang:master Jun 2, 2019
@compnerd compnerd deleted the convert-to-a-pedant branch June 2, 2019 21:56
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