[PATCH] [analyzer] Support spaces in compiler path and arguments.

Антон Ярцев anton.yartsev at gmail.com
Thu Apr 30 17:30:34 PDT 2015


Ok to commit the solution with passing true to quotewords?


================
Comment at: tools/scan-build/ccc-analyzer:182-186
@@ -181,3 +181,7 @@
   $line =~ s/^\s+|\s+$//g;
   my @items = quotewords('\s+', 0, $line);
+  # Wrap arguments that have spaces with quotes.
+  foreach (@items) {
+    $_ = qq/"$_"/ if (/\s+/);
+  }
   my $cmd = shift @items;
----------------
jordan_rose wrote:
> I think we can just pass `true` to quotewords' 'keep' parameter.
Yes, it works.

http://reviews.llvm.org/D9357

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list