aboutsummaryrefslogtreecommitdiff
path: root/clang
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-10-22 18:55:18 +0000
committerJordan Rose <jordan_rose@apple.com>2013-10-22 18:55:18 +0000
commit476bbb02529e023043e1711e08024e2c8dd5dd6c (patch)
tree27aa35e6cd9b30aa050abcfb8a79355dd127ce99 /clang
parentdebb4cf5ea63e6492021c26d7ffda2558c607825 (diff)
downloadllvm-476bbb02529e023043e1711e08024e2c8dd5dd6c.zip
llvm-476bbb02529e023043e1711e08024e2c8dd5dd6c.tar.gz
llvm-476bbb02529e023043e1711e08024e2c8dd5dd6c.tar.bz2
[analyzer] scan-build: Handle -m* option wildcard after compiler/linker flags.
Some of the shared compiler/linker flags start with -m, so they've been getting passed to the compiler only since r180073. Now, the -m* wildcard is processed after the shared flags and the ignored flags. Found by Laszlo Nagy! llvm-svn: 193184
Diffstat (limited to 'clang')
-rwxr-xr-xclang/tools/scan-build/ccc-analyzer9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/tools/scan-build/ccc-analyzer b/clang/tools/scan-build/ccc-analyzer
index 5f63148..b463ec0 100755
--- a/clang/tools/scan-build/ccc-analyzer
+++ b/clang/tools/scan-build/ccc-analyzer
@@ -484,10 +484,6 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) {
while ($Cnt > 0) { ++$i; --$Cnt; push @CompileOpts, $ARGV[$i]; }
next;
}
- if ($Arg =~ /-m.*/) {
- push @CompileOpts,$Arg;
- next;
- }
# Handle the case where there isn't a space after -iquote
if ($Arg =~ /-iquote.*/) {
push @CompileOpts,$Arg;
@@ -549,6 +545,11 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) {
next;
}
+ if ($Arg =~ /-m.*/) {
+ push @CompileOpts,$Arg;
+ next;
+ }
+
# Language.
if ($Arg eq '-x') {
$Lang = $ARGV[$i+1];