Commits

Slava Pestov committed 19f72c85930
ClangImporter: Fix diagnostics for NS* prefix stripping from generic types We were failing to create an unavailable TypeAlias for the old name in the case the renamed type was generic, leading to poor diagnostics. Also, Sema resolves generic TypeAliases very early, while building a Type from a TypeRepr -- this means the unavailable/deprecated check runs too late to catch generic TypeAlises. Add a hack where we preserve a reference to the original TypeAliasDecl by way of constructing a SubstitutedType which desugars to the replacement type, rather than resolving the replacement type directly, so that the availability check can pick it up. A better fix for this would be to introduce a BoundGenericAliasType sugared type, but that's a bigger change that can come later. Fixes <rdar://problem/26206263>.