Skip to content

Fix warnings in main and rebranch #62217

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 4 commits into from
Nov 28, 2022
Merged

Conversation

eeckstein
Copy link
Contributor

A big part of this PR is to change to the new llvm::Optional API:

  • getValue -> value
  • getValueOr -> value_or
  • hasValue -> has_value
  • map -> transform

The old API will be deprecated in the rebranch.
To avoid merge conflicts, use the new API already in main.

rdar://102362022

The PR also contains some other fixes for warnings in main and rebranch. For details see the commit messages.

Avoids a conflict with clang's `ANALYSIS` macro.

Fixes a macro redefinition warning.
add `value()` which replaces the deprecated `getValue()`
`getValue` -> `value`
`getValueOr` -> `value_or`
`hasValue` -> `has_value`
`map` -> `transform`

The old API will be deprecated in the rebranch.
To avoid merge conflicts, use the new API already in the main branch.

rdar://102362022
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit 527d9a8 into swiftlang:main Nov 28, 2022
@eeckstein eeckstein deleted the fix-warnings branch November 28, 2022 17:32
eeckstein added a commit to eeckstein/swift that referenced this pull request Jan 25, 2023
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