Enable lazy ClangImporter diagnostics by default

Replace the existing `-enable-experimental-clang-importer-diagnostics`
flag with an opt-out version entitled `-disable-experimentalc-clang-importer-diagnostics`.
Enable the beviour previously hidden behind the old flag by default.
This commit is contained in:
Nuri Amari
2022-01-16 13:28:59 -05:00
parent 3762ca1fa7
commit 7ec861fbd9
16 changed files with 127 additions and 20 deletions

View File

@@ -590,7 +590,7 @@ Expr *TypeChecker::resolveDeclRefExpr(UnresolvedDeclRefExpr *UDRE,
.diagnose(Loc, diag::cannot_find_in_scope, Name,
Name.isOperator())
.highlight(UDRE->getSourceRange());
if (Context.LangOpts.EnableExperimentalClangImporterDiagnostics) {
if (!Context.LangOpts.DisableExperimentalClangImporterDiagnostics) {
Context.getClangModuleLoader()->diagnoseTopLevelValue(
Name.getFullName());
}