Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 1 | #!/usr/bin/env perl |
Ted Kremenek | b098288 | 2008-03-25 22:35:32 +0000 | [diff] [blame] | 2 | # |
| 3 | # The LLVM Compiler Infrastructure |
| 4 | # |
| 5 | # This file is distributed under the University of Illinois Open Source |
| 6 | # License. See LICENSE.TXT for details. |
| 7 | # |
| 8 | ##===----------------------------------------------------------------------===## |
| 9 | # |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 10 | # A script designed to interpose between the build system and gcc. It invokes |
| 11 | # both gcc and the static analyzer. |
Ted Kremenek | b098288 | 2008-03-25 22:35:32 +0000 | [diff] [blame] | 12 | # |
| 13 | ##===----------------------------------------------------------------------===## |
| 14 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 15 | use strict; |
| 16 | use warnings; |
Ted Kremenek | b315a39 | 2008-09-21 19:56:14 +0000 | [diff] [blame] | 17 | use Cwd qw/ getcwd abs_path /; |
Ted Kremenek | 991c54b | 2008-08-08 20:46:42 +0000 | [diff] [blame] | 18 | use File::Temp qw/ tempfile /; |
| 19 | use File::Path qw / mkpath /; |
Ted Kremenek | 2ec5cd5 | 2008-08-25 20:44:31 +0000 | [diff] [blame] | 20 | |
| 21 | my $CC = $ENV{'CCC_CC'}; |
| 22 | if (!defined $CC) { $CC = "gcc"; } |
Ted Kremenek | 991c54b | 2008-08-08 20:46:42 +0000 | [diff] [blame] | 23 | |
| 24 | ##----------------------------------------------------------------------------## |
| 25 | # Process Clang Crashes. |
| 26 | ##----------------------------------------------------------------------------## |
| 27 | |
| 28 | sub GetPPExt { |
| 29 | my $Lang = shift; |
| 30 | if ($Lang =~ /objective-c/) { return ".mi"; } |
| 31 | return ".i"; |
| 32 | } |
| 33 | |
Ted Kremenek | 5d31f83 | 2008-08-18 18:38:29 +0000 | [diff] [blame] | 34 | sub ProcessClangFailure { |
Ted Kremenek | 9a3c7da | 2008-09-04 00:02:34 +0000 | [diff] [blame] | 35 | my ($Lang, $file, $Args, $HtmlDir, $ErrorType, $ofile) = @_; |
Ted Kremenek | 991c54b | 2008-08-08 20:46:42 +0000 | [diff] [blame] | 36 | my $Dir = "$HtmlDir/crashes"; |
| 37 | mkpath $Dir; |
| 38 | my ($PPH, $PPFile) = tempfile("clang_crash_XXXXXX", |
| 39 | SUFFIX => GetPPExt($Lang), |
| 40 | DIR => $Dir); |
| 41 | |
Ted Kremenek | 2ec5cd5 | 2008-08-25 20:44:31 +0000 | [diff] [blame] | 42 | system $CC, @$Args, "-E", "-o", $PPFile; |
Ted Kremenek | 991c54b | 2008-08-08 20:46:42 +0000 | [diff] [blame] | 43 | close ($PPH); |
Ted Kremenek | 82a1253 | 2008-09-25 00:25:16 +0000 | [diff] [blame^] | 44 | open (OUT, ">", "$PPFile.info.txt") or die "Cannot open $PPFile.info.txt\n"; |
Ted Kremenek | 5f2825f | 2008-09-21 18:04:49 +0000 | [diff] [blame] | 45 | print OUT abs_path($file), "\n"; |
Ted Kremenek | 5d31f83 | 2008-08-18 18:38:29 +0000 | [diff] [blame] | 46 | print OUT "$ErrorType\n"; |
Ted Kremenek | 2dd7ad1 | 2008-08-18 20:55:25 +0000 | [diff] [blame] | 47 | print OUT "@$Args\n"; |
Ted Kremenek | 991c54b | 2008-08-08 20:46:42 +0000 | [diff] [blame] | 48 | close OUT; |
Ted Kremenek | 82a1253 | 2008-09-25 00:25:16 +0000 | [diff] [blame^] | 49 | `uname -a >> $PPFile.info.txt 2>&1`; |
| 50 | `$CC -v >> $PPFile.info.txt 2>&1`; |
Ted Kremenek | 9f9b1fd | 2008-09-12 22:49:36 +0000 | [diff] [blame] | 51 | system 'mv',$ofile,"$PPFile.stderr.txt"; |
Ted Kremenek | 991c54b | 2008-08-08 20:46:42 +0000 | [diff] [blame] | 52 | } |
Ted Kremenek | b098288 | 2008-03-25 22:35:32 +0000 | [diff] [blame] | 53 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 54 | ##----------------------------------------------------------------------------## |
| 55 | # Running the analyzer. |
| 56 | ##----------------------------------------------------------------------------## |
Ted Kremenek | b098288 | 2008-03-25 22:35:32 +0000 | [diff] [blame] | 57 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 58 | sub Analyze { |
| 59 | my ($Clang, $Args, $Lang, $Output, $Verbose, $HtmlDir, $file, $Analyses) = @_; |
Seo Sanghyeon | d389465 | 2008-04-04 11:02:21 +0000 | [diff] [blame] | 60 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 61 | # Skip anything related to C++. |
| 62 | return if ($Lang =~ /c[+][+]/); |
Ted Kremenek | 5d31f83 | 2008-08-18 18:38:29 +0000 | [diff] [blame] | 63 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 64 | my $RunAnalyzer = 0; |
| 65 | my $Cmd; |
| 66 | my @CmdArgs; |
Ted Kremenek | 991c54b | 2008-08-08 20:46:42 +0000 | [diff] [blame] | 67 | my @CmdArgsSansAnalyses; |
Ted Kremenek | 61cd988 | 2008-05-24 15:58:54 +0000 | [diff] [blame] | 68 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 69 | if ($Lang =~ /header/) { |
| 70 | exit 0 if (!defined ($Output)); |
| 71 | $Cmd = 'cp'; |
| 72 | push @CmdArgs,$file; |
| 73 | # Remove the PCH extension. |
| 74 | $Output =~ s/[.]gch$//; |
| 75 | push @CmdArgs,$Output; |
Ted Kremenek | 991c54b | 2008-08-08 20:46:42 +0000 | [diff] [blame] | 76 | @CmdArgsSansAnalyses = @CmdArgs; |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 77 | } |
| 78 | else { |
| 79 | $Cmd = $Clang; |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 80 | push @CmdArgs,'-DIBOutlet=__attribute__((iboutlet))'; |
| 81 | push @CmdArgs,@$Args; |
Ted Kremenek | 991c54b | 2008-08-08 20:46:42 +0000 | [diff] [blame] | 82 | @CmdArgsSansAnalyses = @CmdArgs; |
| 83 | push @CmdArgs,(split /\s/,$Analyses); |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 84 | $RunAnalyzer = 1; |
| 85 | } |
| 86 | |
| 87 | my @PrintArgs; |
| 88 | my $dir; |
| 89 | |
| 90 | if ($Verbose) { |
| 91 | $dir = getcwd(); |
| 92 | print STDERR "\n[LOCATION]: $dir\n"; |
| 93 | push @PrintArgs,"'$Cmd'"; |
| 94 | foreach my $arg (@CmdArgs) { push @PrintArgs,"\'$arg\'"; } |
| 95 | } |
| 96 | |
| 97 | if ($Verbose == 1) { |
Ted Kremenek | 61cd988 | 2008-05-24 15:58:54 +0000 | [diff] [blame] | 98 | # We MUST print to stderr. Some clients use the stdout output of |
| 99 | # gcc for various purposes. |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 100 | print STDERR join(' ',@PrintArgs); |
| 101 | print STDERR "\n"; |
| 102 | } |
| 103 | elsif ($Verbose == 2) { |
| 104 | print STDERR "#SHELL (cd '$dir' && @PrintArgs)\n"; |
| 105 | } |
Ted Kremenek | 61cd988 | 2008-05-24 15:58:54 +0000 | [diff] [blame] | 106 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 107 | if ($RunAnalyzer and defined($HtmlDir)) { |
| 108 | push @CmdArgs,'-o'; |
| 109 | push @CmdArgs,$HtmlDir; |
| 110 | } |
Ted Kremenek | 948e06b | 2008-08-27 22:30:34 +0000 | [diff] [blame] | 111 | |
| 112 | if (defined $ENV{'CCC_UBI'}) { |
| 113 | push @CmdArgs,"--analyzer-viz-egraph-ubigraph"; |
| 114 | } |
Ted Kremenek | 991c54b | 2008-08-08 20:46:42 +0000 | [diff] [blame] | 115 | |
Ted Kremenek | 9a3c7da | 2008-09-04 00:02:34 +0000 | [diff] [blame] | 116 | # Capture the STDERR of clang and send it to a temporary file. |
| 117 | # Capture the STDOUT of clang and reroute it to ccc-analyzer's STDERR. |
| 118 | # We save the output file in the 'crashes' directory if clang encounters |
| 119 | # any problems with the file. |
Ted Kremenek | 1346268 | 2008-09-11 23:05:26 +0000 | [diff] [blame] | 120 | pipe (FROM_CHILD, TO_PARENT); |
Ted Kremenek | 9a3c7da | 2008-09-04 00:02:34 +0000 | [diff] [blame] | 121 | my $pid = fork(); |
| 122 | if ($pid == 0) { |
Ted Kremenek | 1346268 | 2008-09-11 23:05:26 +0000 | [diff] [blame] | 123 | close FROM_CHILD; |
| 124 | open(STDOUT,">&", \*TO_PARENT); |
| 125 | open(STDERR,">&", \*TO_PARENT); |
Ted Kremenek | 9a3c7da | 2008-09-04 00:02:34 +0000 | [diff] [blame] | 126 | exec $Cmd, @CmdArgs; |
| 127 | } |
Ted Kremenek | 1346268 | 2008-09-11 23:05:26 +0000 | [diff] [blame] | 128 | |
| 129 | close TO_PARENT; |
| 130 | my ($ofh, $ofile) = tempfile("clang_output_XXXXXX", DIR => $HtmlDir); |
| 131 | |
| 132 | while (<FROM_CHILD>) { |
| 133 | print $ofh $_; |
| 134 | print STDERR $_; |
| 135 | } |
| 136 | |
| 137 | waitpid($pid,0); |
Ted Kremenek | 9a3c7da | 2008-09-04 00:02:34 +0000 | [diff] [blame] | 138 | my $Result = $?; |
| 139 | |
| 140 | # Did the command die because of a signal? |
| 141 | if ($Result & 127 and $Cmd eq $Clang and defined $HtmlDir) { |
| 142 | ProcessClangFailure($Lang, $file, \@CmdArgsSansAnalyses, $HtmlDir, |
| 143 | "Crash", $ofile); |
| 144 | } |
| 145 | elsif ($Result) { |
| 146 | ProcessClangFailure($Lang, $file, \@CmdArgsSansAnalyses, $HtmlDir, |
| 147 | "Parser Rejects", $ofile); |
| 148 | } |
| 149 | |
| 150 | `rm -f $ofile`; |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 151 | } |
Ted Kremenek | 61cd988 | 2008-05-24 15:58:54 +0000 | [diff] [blame] | 152 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 153 | ##----------------------------------------------------------------------------## |
| 154 | # Lookup tables. |
| 155 | ##----------------------------------------------------------------------------## |
| 156 | |
| 157 | my %CompileOptionMap = ( |
| 158 | '-nostdinc' => 0, |
| 159 | '-fobjc-gc-only' => 0, |
| 160 | '-fobjc-gc' => 0, |
| 161 | '-include' => 1, |
| 162 | '-idirafter' => 1, |
| 163 | '-iprefix' => 1, |
| 164 | '-iquote' => 1, |
| 165 | '-isystem' => 1, |
| 166 | '-iwithprefix' => 1, |
| 167 | '-iwithprefixbefore' => 1 |
| 168 | ); |
| 169 | |
| 170 | my %LinkerOptionMap = ( |
| 171 | '-framework' => 1 |
| 172 | ); |
| 173 | |
| 174 | my %CompilerLinkerOptionMap = ( |
| 175 | '-isysroot' => 1, |
| 176 | '-arch' => 1, |
| 177 | '-v' => 0 |
| 178 | ); |
| 179 | |
| 180 | my %IgnoredOptionMap = ( |
Ted Kremenek | 9402609 | 2008-07-24 03:52:21 +0000 | [diff] [blame] | 181 | '-MT' => 1, # Ignore these preprocessor options. |
| 182 | '-MF' => 1, |
| 183 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 184 | '-fsyntax-only' => 0, |
| 185 | '-save-temps' => 0, |
| 186 | '-install_name' => 1, |
| 187 | '-exported_symbols_list' => 1, |
| 188 | '-current_version' => 1, |
| 189 | '-compatibility_version' => 1, |
| 190 | '-init' => 1, |
| 191 | '-e' => 1, |
| 192 | '-seg1addr' => 1, |
| 193 | '-bundle_loader' => 1, |
| 194 | '-multiply_defined' => 1, |
| 195 | '-sectorder' => 3, |
| 196 | '--param' => 1, |
| 197 | '-u' => 1 |
| 198 | ); |
| 199 | |
| 200 | my %LangMap = ( |
| 201 | 'c' => 'c', |
| 202 | 'cpp' => 'c++', |
| 203 | 'cc' => 'c++', |
| 204 | 'i' => 'c-cpp-output', |
| 205 | 'm' => 'objective-c', |
| 206 | 'mi' => 'objective-c-cpp-output' |
| 207 | ); |
| 208 | |
| 209 | ##----------------------------------------------------------------------------## |
| 210 | # Main Logic. |
| 211 | ##----------------------------------------------------------------------------## |
| 212 | |
| 213 | my $Action = 'link'; |
| 214 | my @CompileOpts; |
| 215 | my @LinkOpts; |
| 216 | my @Files; |
| 217 | my $Lang; |
| 218 | my $Output; |
| 219 | |
| 220 | # Forward arguments to gcc. |
Ted Kremenek | f17ef3c | 2008-08-21 21:47:09 +0000 | [diff] [blame] | 221 | my $Status = system($CC,@ARGV); |
Ted Kremenek | cb344d0 | 2008-08-28 01:18:44 +0000 | [diff] [blame] | 222 | if ($Status) { exit($Status >> 8); } |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 223 | |
| 224 | # Get the analysis options. |
| 225 | my $Analyses = $ENV{'CCC_ANALYZER_ANALYSIS'}; |
| 226 | if (!defined($Analyses)) { $Analyses = '-checker-cfref'; } |
| 227 | |
| 228 | # Determine the level of verbosity. |
| 229 | my $Verbose = 0; |
| 230 | if (defined $ENV{CCC_ANALYZER_VERBOSE}) { $Verbose = 1; } |
| 231 | if (defined $ENV{CCC_ANALYZER_LOG}) { $Verbose = 2; } |
| 232 | |
| 233 | # Determine what clang executable to use. |
| 234 | my $Clang = $ENV{'CLANG'}; |
| 235 | if (!defined $Clang) { $Clang = 'clang'; } |
| 236 | |
| 237 | # Get the HTML output directory. |
| 238 | my $HtmlDir = $ENV{'CCC_ANALYZER_HTML'}; |
| 239 | |
| 240 | |
| 241 | # Process the arguments. |
| 242 | foreach (my $i = 0; $i < scalar(@ARGV); ++$i) { |
| 243 | my $Arg = $ARGV[$i]; |
| 244 | |
| 245 | # Modes ccc-analyzer supports |
| 246 | if ($Arg eq '-E') { $Action = 'preprocess'; } |
| 247 | elsif ($Arg eq '-c') { $Action = 'compile'; } |
| 248 | elsif ($Arg =~ /^-print-prog-name/) { exit 0; } |
Ted Kremenek | b098288 | 2008-03-25 22:35:32 +0000 | [diff] [blame] | 249 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 250 | # Options with possible arguments that should pass through to compiler. |
| 251 | if (defined $CompileOptionMap{$Arg}) { |
| 252 | my $Cnt = $CompileOptionMap{$Arg}; |
| 253 | push @CompileOpts,$Arg; |
| 254 | while ($Cnt > 0) { ++$i; --$Cnt; push @CompileOpts, $ARGV[$i]; } |
| 255 | next; |
| 256 | } |
| 257 | |
| 258 | # Options with possible arguments that should pass through to linker. |
| 259 | if (defined $LinkerOptionMap{$Arg}) { |
| 260 | my $Cnt = $LinkerOptionMap{$Arg}; |
| 261 | push @LinkOpts,$Arg; |
| 262 | while ($Cnt > 0) { ++$i; --$Cnt; push @LinkOpts, $ARGV[$i]; } |
| 263 | next; |
| 264 | } |
| 265 | |
| 266 | # Options with possible arguments that should pass through to both compiler |
| 267 | # and the linker. |
| 268 | if (defined $CompilerLinkerOptionMap{$Arg}) { |
| 269 | my $Cnt = $CompilerLinkerOptionMap{$Arg}; |
| 270 | push @CompileOpts,$Arg; |
| 271 | push @LinkOpts,$Arg; |
| 272 | while ($Cnt > 0) { |
| 273 | ++$i; --$Cnt; |
| 274 | push @CompileOpts, $ARGV[$i]; |
| 275 | push @LinkOpts, $ARGV[$i]; |
| 276 | } |
| 277 | next; |
| 278 | } |
Ted Kremenek | 61cd988 | 2008-05-24 15:58:54 +0000 | [diff] [blame] | 279 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 280 | # Ignored options. |
| 281 | if (defined $IgnoredOptionMap{$Arg}) { |
| 282 | my $Cnt = $IgnoredOptionMap{$Arg}; |
| 283 | while ($Cnt > 0) { |
| 284 | ++$i; --$Cnt; |
| 285 | } |
| 286 | next; |
| 287 | } |
Ted Kremenek | 61cd988 | 2008-05-24 15:58:54 +0000 | [diff] [blame] | 288 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 289 | # Compile mode flags. |
| 290 | if ($Arg =~ /^-[D,I,U](.*)$/) { |
| 291 | my $Tmp = $Arg; |
| 292 | if ($1 eq '') { |
| 293 | # FIXME: Check if we are going off the end. |
| 294 | ++$i; |
| 295 | $Tmp = $Arg . $ARGV[$i]; |
| 296 | } |
| 297 | push @CompileOpts,$Tmp; |
| 298 | next; |
| 299 | } |
| 300 | |
| 301 | # Language. |
| 302 | if ($Arg eq '-x') { |
| 303 | $Lang = $ARGV[$i+1]; |
| 304 | ++$i; next; |
| 305 | } |
Ted Kremenek | 61cd988 | 2008-05-24 15:58:54 +0000 | [diff] [blame] | 306 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 307 | # Output file. |
| 308 | if ($Arg eq '-o') { |
| 309 | ++$i; |
| 310 | $Output = $ARGV[$i]; |
| 311 | next; |
| 312 | } |
| 313 | |
| 314 | # Get the link mode. |
| 315 | if ($Arg =~ /^-[l,L,O]/) { |
| 316 | if ($Arg eq '-O') { push @LinkOpts,'-O1'; } |
| 317 | elsif ($Arg eq '-Os') { push @LinkOpts,'-O2'; } |
| 318 | else { push @LinkOpts,$Arg; } |
| 319 | next; |
| 320 | } |
| 321 | |
| 322 | if ($Arg =~ /^-std=/) { |
| 323 | push @CompileOpts,$Arg; |
| 324 | next; |
| 325 | } |
| 326 | |
| 327 | # if ($Arg =~ /^-f/) { |
| 328 | # # FIXME: Not sure if the remaining -fxxxx options have no arguments. |
| 329 | # push @CompileOpts,$Arg; |
| 330 | # push @LinkOpts,$Arg; # FIXME: Not sure if these are link opts. |
| 331 | # } |
| 332 | |
| 333 | # Get the compiler/link mode. |
| 334 | if ($Arg =~ /^-F(.+)$/) { |
| 335 | my $Tmp = $Arg; |
| 336 | if ($1 eq '') { |
| 337 | # FIXME: Check if we are going off the end. |
| 338 | ++$i; |
| 339 | $Tmp = $Arg . $ARGV[$i]; |
| 340 | } |
| 341 | push @CompileOpts,$Tmp; |
| 342 | push @LinkOpts,$Tmp; |
| 343 | next; |
| 344 | } |
Ted Kremenek | 61cd988 | 2008-05-24 15:58:54 +0000 | [diff] [blame] | 345 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 346 | # Input files. |
| 347 | if ($Arg eq '-filelist') { |
| 348 | # FIXME: Make sure we aren't walking off the end. |
| 349 | open(IN, $ARGV[$i+1]); |
| 350 | while (<IN>) { s/\015?\012//; push @Files,$_; } |
| 351 | close(IN); |
| 352 | ++$i; next; |
| 353 | } |
| 354 | |
| 355 | if (!($Arg =~ /^-/)) { |
| 356 | push @Files,$Arg; next; |
| 357 | } |
| 358 | } |
Ted Kremenek | 61cd988 | 2008-05-24 15:58:54 +0000 | [diff] [blame] | 359 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 360 | if ($Action eq 'compile' or $Action eq 'link') { |
| 361 | foreach my $file (@Files) { |
| 362 | # Determine the language for the file. |
| 363 | my $FileLang = $Lang; |
| 364 | |
| 365 | if (!defined($FileLang)) { |
| 366 | # Infer the language from the extension. |
| 367 | if ($file =~ /[.]([^.]+)$/) { |
| 368 | $FileLang = $LangMap{$1}; |
| 369 | } |
| 370 | } |
Ted Kremenek | 1262fc4 | 2008-05-14 20:10:33 +0000 | [diff] [blame] | 371 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 372 | next if (!defined $FileLang); |
| 373 | |
| 374 | my @AnalyzeArgs; |
| 375 | |
| 376 | if ($FileLang ne 'unknown') { |
| 377 | push @AnalyzeArgs,'-x'; |
| 378 | push @AnalyzeArgs,$FileLang; |
| 379 | } |
Ted Kremenek | b098288 | 2008-03-25 22:35:32 +0000 | [diff] [blame] | 380 | |
Ted Kremenek | fbeeca8 | 2008-07-19 06:11:04 +0000 | [diff] [blame] | 381 | push @AnalyzeArgs,@CompileOpts; |
| 382 | push @AnalyzeArgs,$file; |
| 383 | |
| 384 | Analyze($Clang, \@AnalyzeArgs, $FileLang, $Output, |
| 385 | $Verbose, $HtmlDir, $file, $Analyses); |
| 386 | } |
| 387 | } |
Ted Kremenek | b098288 | 2008-03-25 22:35:32 +0000 | [diff] [blame] | 388 | |
Ted Kremenek | 948e06b | 2008-08-27 22:30:34 +0000 | [diff] [blame] | 389 | exit($Status >> 8); |
| 390 | |
| 391 | |