File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -606,6 +606,20 @@ void Importer::Import(clang::TranslationUnitDecl* translation_unit_decl) {
606606 llvm::copy (GetOrderedItemIdsOfTemplateInstantiations (),
607607 std::back_inserter (
608608 invocation_.ir_ .top_level_item_ids [invocation_.target_ ]));
609+
610+ // Remove any unsupported items.
611+ for (auto & [label, item_ids] : invocation_.ir_ .top_level_item_ids ) {
612+ item_ids.erase (
613+ std::remove_if (
614+ item_ids.begin (), item_ids.end (),
615+ [&](ItemId item_id) {
616+ auto it = import_cache_.find (
617+ reinterpret_cast <clang::Decl*>(item_id.value ()));
618+ return it != import_cache_.end () && it->second .has_value () &&
619+ std::holds_alternative<UnsupportedItem>(*it->second );
620+ }),
621+ item_ids.end ());
622+ }
609623}
610624
611625void Importer::ImportDeclsFromDeclContext (
You can’t perform that action at this time.
0 commit comments