Commit 801be96
committed
NFC: Work around 'cycle detected while resolving' warning.
When building the Swift sources of the compiler many instances of the following
warning are emitted:
```
.../swift-project/swift/include/swift/AST/Attr.h:3075:10: warning: cycle detected while resolving 'iterator' in swift_name attribute for 'operator=='
bool operator==(iterator x) const { return x.attr == attr; }
^
```
These warnings were implemented in #37940
and they indicate that Swift compiler is failing to import a clang decl because
of circular references. Something about the structure of some operator
declarations in C++ headers triggers this warning. I'm not sure what the
correct long term fix for this is, but in the meantime the build log for the
compiler is getting drowned in these warnings which makes it difficult to
notice and find other diagnostics. Since these declarations are getting dropped
instead of imported, we can simply hide them from the Swift compiler in the
first place by guarding the declarations with `#ifdef __swift__`.1 parent a1a975f commit 801be96
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3072 | 3072 | | |
3073 | 3073 | | |
3074 | 3074 | | |
| 3075 | + | |
3075 | 3076 | | |
3076 | 3077 | | |
| 3078 | + | |
3077 | 3079 | | |
3078 | 3080 | | |
3079 | 3081 | | |
| |||
0 commit comments