Merge pull request #84274 from egorzhdan/egorzhdan/rm-dead-partial-var

[cxx-interop] Remove dead logic in const import
This commit is contained in:
Egor Zhdan
2025-09-15 10:06:02 +01:00
committed by GitHub

View File

@@ -4604,15 +4604,11 @@ namespace {
bool initIsEvaluatable = false;
if (Impl.SwiftContext.ClangImporterOpts.EnableConstValueImporting) {
if (auto init = decl->getInit()) {
// Don't import values for partial specializations. TODO: Should we
// stop importing partially specialized variables completely?
bool partial = isa<clang::VarTemplatePartialSpecializationDecl>(decl);
// Don't import values when type-dependent or value-dependent.
bool typeDependent = decl->getType()->isDependentType();
bool valueDependent = init->isValueDependent();
initIsEvaluatable = !partial && !typeDependent && !valueDependent;
initIsEvaluatable = !typeDependent && !valueDependent;
}
}