mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #84274 from egorzhdan/egorzhdan/rm-dead-partial-var
[cxx-interop] Remove dead logic in const import
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user