]> granicus.if.org Git - clang/commitdiff
[scan-build] fix xcode version parsing to handle dot releases. Fixes <rdar://problem...
authorTed Kremenek <kremenek@apple.com>
Thu, 21 Feb 2013 19:33:30 +0000 (19:33 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 21 Feb 2013 19:33:30 +0000 (19:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175781 91177308-0d34-0410-b5e6-96231b3b80d8

tools/scan-build/scan-build

index d02101e62f3599294a51a8aaba7a037fab08336d..bebed558b401350e03b2bd42f817814d8d538229 100755 (executable)
@@ -906,9 +906,12 @@ sub RunXcodebuild {
 
   while(<DETECT_XCODE>) {
     if (/^Xcode (.+)$/) {
-      if ($1 >= 4.6) {
-        $oldBehavior = 0;
-        last;
+      my $ver = $1;
+      if ($ver =~ /^([0-9]+[.][0-9]+)[^0-9]?/) {
+        if ($1 >= 4.6) {
+          $oldBehavior = 0;
+          last;
+        }
       }
     }
   }