Skip to content

Conversation

@delcypher
Copy link

This test was broken by llvm#166738

commit 1df7b512bde79a2580e1599b9e5a01b3505f7659
Author: Vladimir Vuksanovic <[email protected]>
Date:   Fri Dec 5 15:04:12 2025 +0100

    [Sema] Suggest missing format attributes (#166738)

It seems a different warning (-Wmissing-format-attribute) is emitted for the case where a non-format string argument is passed to foo. This new behavior seems a little confusing

  • There's no longer a warning about the call to foo not taking a string literal.
  • The suggested attribute conflicts with the format attribute that's already on bar.

Dealing with this odd behavior is out-of-scope though for fixing this test case though.

rdar://166071403

This test was broken by llvm#166738

```
commit 1df7b51
Author: Vladimir Vuksanovic <[email protected]>
Date:   Fri Dec 5 15:04:12 2025 +0100

    [Sema] Suggest missing format attributes (llvm#166738)
```

It seems a different warning (`-Wmissing-format-attribute`) is emitted
for the case where a non-format string argument is passed to `foo`. This
new behavior seems a little confusing

* There's no longer a warning about the call to `foo` not taking a
  string literal.
* The suggested attribute conflicts with the `format` attribute that's
  already on bar.

Dealing with this odd behavior is out-of-scope though for fixing this
test case though.

rdar://166071403
@delcypher delcypher self-assigned this Dec 17, 2025
@delcypher delcypher added the clang:bounds-safety Issue relating to the experimental -fbounds-safety feature in Clang label Dec 17, 2025
@delcypher
Copy link
Author

Landing now to fix this in CI.

@delcypher
Copy link
Author

@apple-fcloutier You may want to look at this because I think you reviewed the upstream patch to this diagnostic. The new behavior for this example doesn't make a huge amount of sense to me but maybe I'm missing something.

@delcypher delcypher merged commit 5435ff2 into swiftlang:next Dec 17, 2025
@apple-fcloutier
Copy link

I was doing it here for stable/21.x but CI isn't cooperating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:bounds-safety Issue relating to the experimental -fbounds-safety feature in Clang

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants