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 = $_;
   }
 


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to