From aacbae5fdb496d53a8af06d89b28aa6dea5dcef3 Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Sat, 28 Mar 2015 02:17:21 +0000 Subject: [PATCH] [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 --- tools/scan-build/ccc-analyzer | 5 +++++ 1 file changed, 5 insertions(+) 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'; } -- 2.50.1