diff options
author | Devin Coughlin <dcoughlin@apple.com> | 2015-10-26 17:19:51 +0000 |
---|---|---|
committer | Devin Coughlin <dcoughlin@apple.com> | 2015-10-26 17:19:51 +0000 |
commit | b564c0a9f8572b8930f7082a3c5a4732a990fbcb (patch) | |
tree | b2d5c5fe37155f0fff57f430e19bfd8abb42bdf2 /tools/scan-build | |
parent | 7b012b207b1c104c9bbb1ec1cfc42721d6416e4b (diff) |
[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 <https://llvm.org/bugs/show_bug.cgi?id=13237>.
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
Diffstat (limited to 'tools/scan-build')
-rwxr-xr-x | tools/scan-build/ccc-analyzer | 2 |
1 files changed, 1 insertions, 1 deletions
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. |