r204253 - [analyzer] scan-build: when matching flags, make sure the - is the first letter.
Jordan Rose
jordan_rose at apple.com
Wed Mar 19 10:42:27 PDT 2014
Author: jrose
Date: Wed Mar 19 12:42:26 2014
New Revision: 204253
URL: http://llvm.org/viewvc/llvm-project?rev=204253&view=rev
Log:
[analyzer] scan-build: when matching flags, make sure the - is the first letter.
PR19191
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=204253&r1=204252&r2=204253&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/ccc-analyzer (original)
+++ cfe/trunk/tools/scan-build/ccc-analyzer Wed Mar 19 12:42:26 2014
@@ -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);
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);
next;
}
- if ($Arg =~ /-m.*/) {
+ if ($Arg =~ /^-m.*/) {
push @CompileOpts,$Arg;
next;
}
More information about the cfe-commits
mailing list