Skip to content
Snippets Groups Projects
Commit 8e073be1 authored by Anton Yartsev's avatar Anton Yartsev
Browse files

[analyzer] This eliminates regression caused by r236423.

Wrap an argument with quotes only if it has spaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236533 91177308-0d34-0410-b5e6-96231b3b80d8
parent df57d491
No related branches found
No related tags found
No related merge requests found
......@@ -179,7 +179,11 @@ sub GetCCArgs {
die "could not find clang line\n" if (!defined $line);
# Strip leading and trailing whitespace characters.
$line =~ s/^\s+|\s+$//g;
my @items = quotewords('\s+', 1, $line);
my @items = quotewords('\s+', 0, $line);
# Wrap arguments that have spaces with quotes.
foreach (@items) {
$_ = qq/"$_"/ if (/\s+/);
}
my $cmd = shift @items;
die "cannot find 'clang' in 'clang' command\n" if (!($cmd =~ /clang/));
return \@items;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment