[analyzer] scan-build: when matching flags, make sure the - is the first letter.

PR19191

llvm-svn: 204253
This commit is contained in:
Jordan Rose 2014-03-19 17:42:26 +00:00
parent c11f305082
commit 69ab726724
1 changed files with 3 additions and 3 deletions

View File

@ -150,7 +150,7 @@ sub GetCCArgs {
close(TO_PARENT);
my $line;
while (<FROM_CHILD>) {
next if (!/-cc1/);
next if (!/\b-cc1\b/);
$line = $_;
}
@ -496,7 +496,7 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) {
next;
}
# Handle the case where there isn't a space after -iquote
if ($Arg =~ /-iquote.*/) {
if ($Arg =~ /^-iquote.*/) {
push @CompileOpts,$Arg;
next;
}
@ -556,7 +556,7 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) {
next;
}
if ($Arg =~ /-m.*/) {
if ($Arg =~ /^-m.*/) {
push @CompileOpts,$Arg;
next;
}