mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This patch introduces new diagnostics to the ClangImporter to help explain why certain C, Objective-C or C++ declarations fail to import into Swift. This patch includes new diagnostics for the following entities: - C functions - C struct fields - Macros - Objective-C properties - Objective-C methods In particular, notes are attached to indicate when any of the above entities fail to import as a result of refering an incomplete (only forward declared) type. The new diangostics are hidden behind two new flags, -enable-experimental-clang-importer-diagnostics and -enable-experimental-eager-clang-module-diagnostics. The first flag emits diagnostics lazily, while the second eagerly imports all declarations visible from loaded Clang modules. The first flag is intended for day to day swiftc use, the second for module linting or debugging the importer.
94 KiB
94 KiB