Attach Lazy ClangImporter Diagnostics as Notes

Clang importer diagnostics that are produced as a result of a reference
in Swift code are attached to as notes to the Sema produced diagnostic
that indicates the declaration is unavailable.

Ex: Notes about why a C function import failed are attached to
the error explaining that the symbol could not be found in scope.
This commit is contained in:
Nuri Amari
2022-01-28 18:46:12 -05:00
parent 9e93369a33
commit 3762ca1fa7
25 changed files with 396 additions and 336 deletions

View File

@@ -6402,13 +6402,6 @@ void ModuleFile::loadAllMembers(Decl *container, uint64_t contextData) {
}
}
void ModuleFile::diagnoseMissingNamedMember(const IterableDeclContext *IDC,
DeclName name) {
// TODO: Implement diagnostics for failed member lookups from module files.
llvm_unreachable(
"Missing member diangosis is not implemented for module files.");
}
static llvm::Error consumeErrorIfXRefNonLoadedModule(llvm::Error &&error) {
// Missing module errors are most likely caused by an
// implementation-only import hiding types and decls.