Update conditionals that reference __TV_OS_VERSION_MIN_REQUIRED and __TV_OS_VERSION_MAX_ALLOWED, assuming that they both have values >= 130000. This means that expressions like "__TV_OS_VERSION_MIN_REQUIRED < 130000" are always False and "__TV_OS_VERSION_MIN_REQUIRED >= 130000" are always True.
<rdar://problem/54541355>
Make sure to check the value of __IPHONE_OS_VERSION_MIN_REQUIRED too, so you can remove even more in some cases (like the ones I mentioned in the watchOS patch).
Created attachment 376906 [details] Patch
(In reply to Darin Adler from comment #2) > Make sure to check the value of __IPHONE_OS_VERSION_MIN_REQUIRED too, so you > can remove even more in some cases (like the ones I mentioned in the watchOS > patch). I added a note in the watchOS patch that we think the current handling is correct.
Attachment 376906 [details] did not pass style-queue: ERROR: Tools/TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:141: Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5] ERROR: Tools/TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:146: Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5] ERROR: Tools/TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:161: Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5] ERROR: Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:32: Incorrect OS version check. VERSION_MIN_REQUIRED values never include a minor version. You may be looking for a combination of VERSION_MIN_REQUIRED for target OS version check and VERSION_MAX_ALLOWED for SDK check. [build/version_check] [5] ERROR: Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:32: Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5] ERROR: Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:34: Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5] ERROR: Source/WebCore/PAL/pal/spi/cocoa/NSProgressSPI.h:30: Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5] Total errors found: 7 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
All of those style errors are pre-existing. Some will be cleaned up in subsequent patches that remove support for older OSes on other platforms.
This is a pretty small, simple patch if someone would like to take a look at it.
Comment on attachment 376906 [details] Patch Clearing flags on attachment: 376906 Committed r249033: <https://trac.webkit.org/changeset/249033>
All reviewed patches have been landed. Closing bug.