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 @@ -1746,7 +1746,7 @@ PlatformAvailability::PlatformAvailability(LangOptions &langOpts)
1746
1746
" APIs deprecated as of macOS 10.9 and earlier are unavailable in Swift" ;
1747
1747
break ;
1748
1748
1749
- default :
1749
+ case PlatformKind::none :
1750
1750
break ;
1751
1751
}
1752
1752
}
@@ -1787,7 +1787,11 @@ bool PlatformAvailability::treatDeprecatedAsUnavailable(
1787
1787
Optional<unsigned > minor = version.getMinor ();
1788
1788
1789
1789
switch (platformKind) {
1790
+ case PlatformKind::none:
1791
+ llvm_unreachable (" version but no platform?" );
1792
+
1790
1793
case PlatformKind::OSX:
1794
+ case PlatformKind::OSXApplicationExtension:
1791
1795
// Anything deprecated in OSX 10.9.x and earlier is unavailable in Swift.
1792
1796
return major < 10 ||
1793
1797
(major == 10 && (!minor.hasValue () || minor.getValue () <= 9 ));
@@ -1803,10 +1807,9 @@ bool PlatformAvailability::treatDeprecatedAsUnavailable(
1803
1807
case PlatformKind::watchOSApplicationExtension:
1804
1808
// No deprecation filter on watchOS
1805
1809
return false ;
1806
-
1807
- default :
1808
- return false ;
1809
1810
}
1811
+
1812
+ llvm_unreachable (" Unexpected platform" );
1810
1813
}
1811
1814
1812
1815
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