From b564c0a9f8572b8930f7082a3c5a4732a990fbcb Mon Sep 17 00:00:00 2001 From: Devin Coughlin Date: Mon, 26 Oct 2015 17:19:51 +0000 Subject: [analyzer] ccc-analyzer: Fix -isystem value passing. The regex for -isystem matching is broken. -[D,I,Usystem] matches "-D", "-,", "-I", "-U", "-s" "-y", etc. Besides that, "-isystem /foo" gets interpreted as "-i" with a non-empty value "system" and thus the next "/foo" argument is not read. This patch corrects the regex. This fixes PR13237 . A patch by Peter Wu! Differential Revision: http://reviews.llvm.org/D13800 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251312 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/scan-build/ccc-analyzer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/scan-build') diff --git a/tools/scan-build/ccc-analyzer b/tools/scan-build/ccc-analyzer index 8bbb1037e6..831dd42e9c 100755 --- a/tools/scan-build/ccc-analyzer +++ b/tools/scan-build/ccc-analyzer @@ -586,7 +586,7 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) { } # Compile mode flags. - if ($Arg =~ /^-[D,I,U,isystem](.*)$/) { + if ($Arg =~ /^-(?:[DIU]|isystem)(.*)$/) { my $Tmp = $Arg; if ($1 eq '') { # FIXME: Check if we are going off the end. -- cgit v1.2.3