[clang] [clang][darwin] macOS no longer infers a minimum deployment version from the OS version (PR #181958)

Cyndy Ishida via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 18 10:00:08 PST 2026


================
@@ -1938,9 +1938,13 @@ struct DarwinPlatform {
                                           const DarwinSDKInfo &SDKInfo) {
     const DarwinSDKInfo::SDKPlatformInfo PlatformInfo =
         SDKInfo.getCanonicalPlatformInfo();
-    DarwinPlatform Result(InferredFromSDK,
-                          getPlatformFromOS(PlatformInfo.getOS()),
-                          SDKInfo.getVersion());
+    const llvm::Triple::OSType OS = PlatformInfo.getOS();
+    VersionTuple Version = SDKInfo.getVersion();
+    if (OS == llvm::Triple::MacOSX) {
----------------
cyndyishida wrote:

nit: don't need parentheses 

https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements

https://github.com/llvm/llvm-project/pull/181958


More information about the cfe-commits mailing list