Currently if you use -mmacosx-version-min or -mios-version-min without
specifying a version number, clang silently sets the minimum version to
"0.0.0". This is almost certainly not what was intended, so it is better
to report it as an error. rdar://problem/
20433945
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234270
91177308-0d34-0410-b5e6-
96231b3b80d8
Major = Minor = Micro = 0;
if (*Str == '\0')
- return true;
+ return false;
char *End;
Major = (unsigned) strtol(Str, &End, 10);
// RUN: %clang -target x86_64-apple-macosx -mmacosx-version-min=10.10 -c %s -### 2>&1 | \
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
// CHECK-VERSION-OSX10: "x86_64-apple-macosx10.10.0"
+// RUN: %clang -target x86_64-apple-macosx -mmacosx-version-min= -c %s -### 2>&1 | \
+// RUN: FileCheck --check-prefix=CHECK-VERSION-MISSING %s
+// CHECK-VERSION-MISSING: invalid version number
// Check environment variable gets interpreted correctly
// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 \