From: Anna Zaks Date: Sat, 28 Mar 2015 02:17:21 +0000 (+0000) Subject: [scan-build] Be friendly to "" in the argument list. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aacbae5fdb496d53a8af06d89b28aa6dea5dcef3;p=clang [scan-build] Be friendly to "" in the argument list. Do not fail when "" is one of the compilation arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233465 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/scan-build/ccc-analyzer b/tools/scan-build/ccc-analyzer index aa02653a49..4549b29a80 100755 --- a/tools/scan-build/ccc-analyzer +++ b/tools/scan-build/ccc-analyzer @@ -492,6 +492,11 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) { my $Arg = $ARGV[$i]; my ($ArgKey) = split /=/,$Arg,2; + # Be friendly to "" in the argument list. + if (!defined($ArgKey)) { + next; + } + # Modes ccc-analyzer supports if ($Arg =~ /^-(E|MM?)$/) { $Action = 'preprocess'; } elsif ($Arg eq '-c') { $Action = 'compile'; }