diff --git a/clang/tools/scan-build/scan-build b/clang/tools/scan-build/scan-build index 585efd516975..153be2dca1c9 100755 --- a/clang/tools/scan-build/scan-build +++ b/clang/tools/scan-build/scan-build @@ -99,10 +99,10 @@ sub DieDiag { if (grep /^--help-checkers$/, @ARGV) { my @options = qx($0 -h); foreach (@options) { - next unless /^ \+/; - s/^\s*//; - my ($sign, $name, @text) = split ' ', $_; - print $name, $/ if $sign eq '+'; + next unless /^ \+/; + s/^\s*//; + my ($sign, $name, @text) = split ' ', $_; + print $name, $/ if $sign eq '+'; } exit 0; } @@ -603,7 +603,7 @@ function CopyCheckedStateToCheckButtons(SummaryCheckButton) { if(Inputs[i] != SummaryCheckButton) { Inputs[i].checked = SummaryCheckButton.checked; Inputs[i].onclick(); - } + } } } } @@ -1562,14 +1562,14 @@ while (@ARGV) { next; } if ($arg eq "--use-analyzer") { - shift @ARGV; - $AnalyzerDiscoveryMethod = shift @ARGV; - next; + shift @ARGV; + $AnalyzerDiscoveryMethod = shift @ARGV; + next; } if ($arg =~ /^--use-analyzer=(.+)$/) { shift @ARGV; - $AnalyzerDiscoveryMethod = $1; - next; + $AnalyzerDiscoveryMethod = $1; + next; } if ($arg eq "--keep-empty") { shift @ARGV; @@ -1602,17 +1602,17 @@ if (!defined $AnalyzerDiscoveryMethod) { if (!defined $Clang || ! -x $Clang) { if (!$RequestDisplayHelp && !$ForceDisplayHelp) { DieDiag("error: Cannot find an executable 'clang' relative to scan-build." . - " Consider using --use-analyzer to pick a version of 'clang' to use for static analysis.\n"); + " Consider using --use-analyzer to pick a version of 'clang' to use for static analysis.\n"); } } } else { if ($AnalyzerDiscoveryMethod =~ /^[Xx]code$/) { - my $xcrun = `which xcrun`; + my $xcrun = `which xcrun`; chomp $xcrun; - if ($xcrun eq "") { - DieDiag("Cannot find 'xcrun' to find 'clang' for analysis.\n"); - } + if ($xcrun eq "") { + DieDiag("Cannot find 'xcrun' to find 'clang' for analysis.\n"); + } $Clang = `$xcrun -toolchain XcodeDefault -find clang`; chomp $Clang; if ($Clang eq "") { @@ -1621,9 +1621,9 @@ else { } else { $Clang = $AnalyzerDiscoveryMethod; - if (!defined $Clang or not -x $Clang) { - DieDiag("Cannot find an executable clang at '$AnalyzerDiscoveryMethod'\n"); - } + if (!defined $Clang or not -x $Clang) { + DieDiag("Cannot find an executable clang at '$AnalyzerDiscoveryMethod'\n"); + } } }