File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1747,7 +1747,7 @@ PlatformAvailability::PlatformAvailability(LangOptions &langOpts)
1747
1747
" APIs deprecated as of macOS 10.9 and earlier are unavailable in Swift" ;
1748
1748
break ;
1749
1749
1750
- default :
1750
+ case PlatformKind::none :
1751
1751
break ;
1752
1752
}
1753
1753
}
@@ -1788,7 +1788,11 @@ bool PlatformAvailability::treatDeprecatedAsUnavailable(
1788
1788
Optional<unsigned > minor = version.getMinor ();
1789
1789
1790
1790
switch (platformKind) {
1791
+ case PlatformKind::none:
1792
+ llvm_unreachable (" version but no platform?" );
1793
+
1791
1794
case PlatformKind::OSX:
1795
+ case PlatformKind::OSXApplicationExtension:
1792
1796
// Anything deprecated in OSX 10.9.x and earlier is unavailable in Swift.
1793
1797
return major < 10 ||
1794
1798
(major == 10 && (!minor.hasValue () || minor.getValue () <= 9 ));
@@ -1804,10 +1808,9 @@ bool PlatformAvailability::treatDeprecatedAsUnavailable(
1804
1808
case PlatformKind::watchOSApplicationExtension:
1805
1809
// No deprecation filter on watchOS
1806
1810
return false ;
1807
-
1808
- default :
1809
- return false ;
1810
1811
}
1812
+
1813
+ llvm_unreachable (" Unexpected platform" );
1811
1814
}
1812
1815
1813
1816
ClangImporter::Implementation::Implementation (ASTContext &ctx,
Original file line number Diff line number Diff line change 1
1
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules %s
2
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules -application-extension %s
2
3
3
4
// REQUIRES: OS=ios
4
5
Original file line number Diff line number Diff line change 1
1
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules %s
2
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules -application-extension %s
2
3
3
4
// REQUIRES: OS=macosx
4
5
You can’t perform that action at this time.
0 commit comments