r204356 - [analyzer] scan-build: match whitespace instead of word boundaries around flags.
Jordan Rose
jordan_rose at apple.com
Thu Mar 20 09:37:54 PDT 2014
Author: jrose
Date: Thu Mar 20 11:37:54 2014
New Revision: 204356
URL: http://llvm.org/viewvc/llvm-project?rev=204356&view=rev
Log:
[analyzer] scan-build: match whitespace instead of word boundaries around flags.
Because neither ' ' nor '-' is alphanumeric, \b won't match between them!
Since in this case we know our output is coming from a -### invocation,
we should always have spaces on both sides of the flag we're trying to match,
"-cc1".
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=204356&r1=204355&r2=204356&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/ccc-analyzer (original)
+++ cfe/trunk/tools/scan-build/ccc-analyzer Thu Mar 20 11:37:54 2014
@@ -150,7 +150,7 @@ sub GetCCArgs {
close(TO_PARENT);
my $line;
while (<FROM_CHILD>) {
- next if (!/\b-cc1\b/);
+ next if (!/\s-cc1\s/);
$line = $_;
}
More information about the cfe-commits
mailing list