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

Revert -Wformat for scoped enums #8638

Merged
merged 2 commits into from May 1, 2024

Conversation

porglezomp
Copy link

The covered diagnostic change hadn't landed yet in an Apple compiler release.
During qualification, we ran into the fact that the os_log APIs force -Wformat to an error, and this causes a lot of churn for users dealing with this. There's some discussion upstream about what exactly the behavior of this diagnostic should be, and we're not ready to ship this.

This reverts the -Wformat change for scoped enums for this release.

For later releases, this diagnostic is moved to -Wformat-pedantic which shouldn't run into the same adoption issues. See: llvm#88595

@porglezomp
Copy link
Author

@swift-ci please test

@ravikandhadai ravikandhadai merged commit a8b8b0e into swift/release/6.0 May 1, 2024
3 checks passed
@porglezomp porglezomp deleted the revert-wformat-scoped-enum branch May 1, 2024 17:46
@@ -12,33 +12,21 @@ struct S {
N::E Type;
};

using uint32_t = unsigned;
enum class FixedE : uint32_t { Two };

void a(N::E NEVal, S *SPtr, S &SRef) {
printf("%d", N::E::One); // expected-warning{{format specifies type 'int' but the argument has type 'N::E'}}

Choose a reason for hiding this comment

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

Were these expected-warning necessary on the Apple CI after the changes?

They seem to be failing in every configuration when we pick up this change in our CI.

I noticed that there was no "please test llvm" in this change, so the LLVM/Clang tests were not executed in this PR.

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.

None yet

5 participants