mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
swift-ide-test: Add a -skip-unavailable option to skip unavailable declarations
Swift SVN r16056
This commit is contained in:
@@ -131,6 +131,10 @@ void swift::ide::printSubmoduleInterface(
|
||||
// Separate the declarations that we are going to print into different
|
||||
// buckets.
|
||||
for (Decl *D : Decls) {
|
||||
// If requested, skip unavailable declarations.
|
||||
if (Options.SkipUnavailable && D->getAttrs().isUnavailable())
|
||||
continue;
|
||||
|
||||
if (auto ID = dyn_cast<ImportDecl>(D)) {
|
||||
ImportDecls.push_back(ID);
|
||||
continue;
|
||||
@@ -145,8 +149,9 @@ void swift::ide::printSubmoduleInterface(
|
||||
|
||||
auto *OwningModule = Importer.getClangOwningModule(CN);
|
||||
auto I = ClangDecls.find(OwningModule);
|
||||
if (I != ClangDecls.end())
|
||||
if (I != ClangDecls.end()) {
|
||||
I->second.push_back({ D, Loc });
|
||||
}
|
||||
continue;
|
||||
}
|
||||
SwiftDecls.push_back(D);
|
||||
|
||||
Reference in New Issue
Block a user