]> granicus.if.org Git - clang/commitdiff
[analyzer] scan-build: match whitespace instead of word boundaries around flags.
authorJordan Rose <jordan_rose@apple.com>
Thu, 20 Mar 2014 16:37:54 +0000 (16:37 +0000)
committerJordan Rose <jordan_rose@apple.com>
Thu, 20 Mar 2014 16:37:54 +0000 (16:37 +0000)
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".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204356 91177308-0d34-0410-b5e6-96231b3b80d8

tools/scan-build/ccc-analyzer

index 7f4db96a82db5de250e11bff2f0ecdee19de69fd..df419368cbfd37cee481c5213a2ae44ccd080799 100755 (executable)
@@ -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 = $_;
   }