[cfe-dev] scan-build and -include option
Julien Tous
julien.tous at gmail.com
Tue Jul 22 09:45:49 PDT 2014
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;
+ }
+
if ($Arg =~ /^-f/) {
push @CompileOpts,$Arg;
push @LinkOpts,$Arg;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140722/ada35c52/attachment.html>
More information about the cfe-dev
mailing list