scan-build and -include option

Hi

scan-build fails to analyse command line containing multiple -include option.

Bellow is a quick patch that (i believe) fix this.

This is my very first experience with perl, so it might be totally wrong.

Can it be integrated, or similar functionality ?

Julien

— /usr/share/clang/scan-build/ccc-analyzer 2014-07-22 18:36:39.009334094 +0200
+++ ccc-analyzer 2014-07-22 18:38:18.833334082 +0200
@@ -329,7 +329,6 @@

my %CompileOptionMap = (
‘-nostdinc’ => 0,

  • ‘-include’ => 1,
    ‘-idirafter’ => 1,
    ‘-imacros’ => 1,
    ‘-iprefix’ => 1,
    @@ -610,6 +609,12 @@
    next;
    }
  • if ($Arg =~ /^-include/) {
  • ++$i;
  • push @CompileOpts, $Arg, $ARGV[$i];
  • next;
  • }