Implement predates-concurrency imports for Sendable diagnostic downgrades

This commit is contained in:
Doug Gregor
2021-12-20 15:45:55 -08:00
parent f7291f0b21
commit 0367213929
6 changed files with 76 additions and 6 deletions

View File

@@ -548,6 +548,11 @@ UnboundImport::UnboundImport(ImportDecl *ID)
spiGroups.append(attrSPIs.begin(), attrSPIs.end());
}
import.spiGroups = ID->getASTContext().AllocateCopy(spiGroups);
if (auto attr = ID->getAttrs().getAttribute<PredatesConcurrencyAttr>()) {
import.options |= ImportFlags::PredatesConcurrency;
import.predatesConcurrencyRange = attr->getRangeWithAt();
}
}
bool UnboundImport::checkNotTautological(const SourceFile &SF) {