[SourceKit] Print custom attributes in interface-gen requests

Custom attributes were not printed because they are marked
'UserInaccesible'.

* Make CustomAttr 'RejectByParser' instead of 'UserInaccessible'
* Remove special treatment for Result Builder attributes
* Load implicit modules in module/header interface gen requests

rdar://79927502
This commit is contained in:
Rintaro Ishizaki
2022-03-01 10:47:19 -08:00
parent 9f95d012f1
commit b6119018d7
12 changed files with 93 additions and 25 deletions

View File

@@ -381,11 +381,10 @@ SwiftInterfaceGenContext::create(StringRef DocumentName,
ASTContext &Ctx = CI.getASTContext();
CloseClangModuleFiles scopedCloseFiles(*Ctx.getClangModuleLoader());
// Load standard library so that Clang importer can use it.
auto *Stdlib = Ctx.getModuleByIdentifier(Ctx.StdlibModuleName);
if (!Stdlib) {
ErrMsg = "Could not load the stdlib module";
return nullptr;
// Load implict imports so that Clang importer can use them.
for (auto unloadedImport :
CI.getMainModule()->getImplicitImportInfo().AdditionalUnloadedImports) {
(void)Ctx.getModule(unloadedImport.module.getModulePath());
}
if (IsModule) {