Skip to content

Suppress warnings for Swift C++ interop by hiding operator declarations #9521

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

tshortli
Copy link

@tshortli tshortli commented Nov 6, 2024

Without this change, the Swift compiler build is fully of spammy warnings like this:

.../DependentDiagnostic.h:152:8: warning: cycle detected while resolving 'ddiag_iterator' in swift_name attribute for 'operator=='
  bool operator==(ddiag_iterator Other) const {
       ^
.../DependentDiagnostic.h:127:20: note: while resolving 'DeclContext' in swift_name attribute for 'ddiag_iterator'
class DeclContext::ddiag_iterator {
                   ^
.../DependentDiagnostic.h:152:8: note: please report this issue to the owners of 'Clang_AST.DeclBase'
  bool operator==(ddiag_iterator Other) const {
       ^

Without this change, the Swift compiler build is fully of spammy warnings like this:

```
.../DependentDiagnostic.h:152:8: warning: cycle detected while resolving 'ddiag_iterator' in swift_name attribute for 'operator=='
  bool operator==(ddiag_iterator Other) const {
       ^
.../DependentDiagnostic.h:127:20: note: while resolving 'DeclContext' in swift_name attribute for 'ddiag_iterator'
class DeclContext::ddiag_iterator {
                   ^
.../DependentDiagnostic.h:152:8: note: please report this issue to the owners of 'Clang_AST.DeclBase'
  bool operator==(ddiag_iterator Other) const {
       ^
```
@tshortli tshortli force-pushed the suppress-swift-cxx-interop-cycle-warnings branch from e3ed6e3 to 3ce6236 Compare November 6, 2024 19:39
@tshortli tshortli merged commit 9a60156 into swiftlang:next Nov 7, 2024
@tshortli tshortli deleted the suppress-swift-cxx-interop-cycle-warnings branch November 7, 2024 01:55
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