Skip to content

Commit ce521a2

Browse files
committed
ClangImporter: Remove one last Swift 3 check
1 parent 6fbd619 commit ce521a2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/ClangImporter/ClangAdapter.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -741,11 +741,10 @@ OptionalTypeKind importer::getParamOptionality(version::Version swiftVersion,
741741
return OTK_None;
742742

743743
// Check for the 'static' annotation on C arrays.
744-
if (!swiftVersion.isVersion3())
745-
if (const auto *DT = dyn_cast<clang::DecayedType>(paramTy))
746-
if (const auto *AT = DT->getOriginalType()->getAsArrayTypeUnsafe())
747-
if (AT->getSizeModifier() == clang::ArrayType::Static)
748-
return OTK_None;
744+
if (const auto *DT = dyn_cast<clang::DecayedType>(paramTy))
745+
if (const auto *AT = DT->getOriginalType()->getAsArrayTypeUnsafe())
746+
if (AT->getSizeModifier() == clang::ArrayType::Static)
747+
return OTK_None;
749748

750749
// Default to implicitly unwrapped optionals.
751750
return OTK_ImplicitlyUnwrappedOptional;

0 commit comments

Comments
 (0)