[cxx-interop] Do not import typedef members of clang::RecordDecls #85072
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In C++, it is legal to have a typedef to an invalid type (e.g., a templated type that cannot be instantiated). We should not import these eagerly in Swift, because doing so causes spurious type errors that would not otherwise appear in C++---this is validated by the test that is added in this patch, which runs clang.
Instead, we can rely on these types being lazily imported on-demand, i.e., only when the type is referenced directly in Swift or indirectly by an imported decl that is used in Swift.
rdar://145238539