diff options
author | Jordan Rose <jordan_rose@apple.com> | 2014-03-19 17:42:26 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2014-03-19 17:42:26 +0000 |
commit | 63a1a884644024e38677cac8535f32c23ca73d58 (patch) | |
tree | eb5e6d2a734a23246c4e151abd272cf2c842a5a5 /tools/scan-build | |
parent | 1cde496a9806c0bc93cd589cac949d2c1611bb06 (diff) | |
download | clang-63a1a884644024e38677cac8535f32c23ca73d58.tar.gz clang-63a1a884644024e38677cac8535f32c23ca73d58.tar.bz2 clang-63a1a884644024e38677cac8535f32c23ca73d58.tar.xz |
[analyzer] scan-build: when matching flags, make sure the - is the first letter.
PR19191
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/scan-build')
-rwxr-xr-x | tools/scan-build/ccc-analyzer | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/scan-build/ccc-analyzer b/tools/scan-build/ccc-analyzer index e1feae7dac..7f4db96a82 100755 --- a/tools/scan-build/ccc-analyzer +++ b/tools/scan-build/ccc-analyzer @@ -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; } |