Author: dcoughlin Date: Mon Oct 26 12:19:51 2015 New Revision: 251312 URL: http://llvm.org/viewvc/llvm-project?rev=251312&view=rev Log: [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 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=251312&r1=251311&r2=251312&view=diff ============================================================================== --- cfe/trunk/tools/scan-build/ccc-analyzer (original) +++ cfe/trunk/tools/scan-build/ccc-analyzer Mon Oct 26 12:19:51 2015 @@ -586,7 +586,7 @@ foreach (my $i = 0; $i < scalar(@ARGV); } # 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. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits