From 4b7a75dd65b3bbc35d6f34c28d1e2ad70dfdfa33 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Thu, 20 Mar 2014 16:37:54 +0000 Subject: [PATCH] [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". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204356 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/scan-build/ccc-analyzer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/scan-build/ccc-analyzer b/tools/scan-build/ccc-analyzer index 7f4db96a82..df419368cb 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 () { - next if (!/\b-cc1\b/); + next if (!/\s-cc1\s/); $line = $_; } -- 2.50.1