]> granicus.if.org Git - clang/commitdiff
Fix a few issues related to -with-analyzer reported by Jordan. Let's
authorTed Kremenek <kremenek@apple.com>
Fri, 24 Aug 2012 23:42:58 +0000 (23:42 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 24 Aug 2012 23:42:58 +0000 (23:42 +0000)
have the option with two '--' to be consistent with other options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162625 91177308-0d34-0410-b5e6-96231b3b80d8

tools/scan-build/scan-build

index 12dd653e11026c1f2cce6c9f67f17537c56d5573..d62ef0323ea542021081dce3b026e2054c5546e5 100755 (executable)
@@ -1080,8 +1080,8 @@ ADVANCED OPTIONS:
  
    Generate internal analyzer statistics.
  
- -with-analyzer [Xcode|path to clang] 
- -with-analyzer=[Xcode|path to clang]
+ --with-analyzer [Xcode|path to clang] 
+ --with-analyzer=[Xcode|path to clang]
  
    scan-build uses the 'clang' executable relative to itself for static
    analysis. One can override this behavior with this option by using the
@@ -1435,12 +1435,12 @@ while (@ARGV) {
     push @PluginsToLoad, "-load", shift @ARGV;
     next;
   }
-  if ($arg eq "-with-analyzer") {
+  if ($arg eq "--with-analyzer") {
        shift @ARGV;
        $AnalyzerDiscoveryMethod = shift @ARGV;
        next;
   }
-  if ($arg =~ /^-with-analyzer=(.+)$/) {
+  if ($arg =~ /^--with-analyzer=(.+)$/) {
     shift @ARGV;
        $AnalyzerDiscoveryMethod = $1;
        next;
@@ -1473,7 +1473,7 @@ if (!defined $AnalyzerDiscoveryMethod) {
   }
 } 
 else {  
-  if ($AnalyzerDiscoveryMethod =~ /^[X,x]code$/) {
+  if ($AnalyzerDiscoveryMethod =~ /^[Xx]code$/) {
        my $xcrun = `which xcrun`;
     chomp $xcrun;
        if ($xcrun eq "") {