r233465 - [scan-build] Be friendly to "" in the argument list.

Anna Zaks ganna at apple.com
Fri Mar 27 19:17:21 PDT 2015


Author: zaks
Date: Fri Mar 27 21:17:21 2015
New Revision: 233465

URL: http://llvm.org/viewvc/llvm-project?rev=233465&view=rev
Log:
[scan-build] Be friendly to "" in the argument list.

Do not fail when "" is one of the compilation arguments.

Modified:
    cfe/trunk/tools/scan-build/ccc-analyzer

Modified: cfe/trunk/tools/scan-build/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/ccc-analyzer?rev=233465&r1=233464&r2=233465&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/ccc-analyzer (original)
+++ cfe/trunk/tools/scan-build/ccc-analyzer Fri Mar 27 21:17:21 2015
@@ -492,6 +492,11 @@ foreach (my $i = 0; $i < scalar(@ARGV);
   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'; }





More information about the cfe-commits mailing list