[PATCH] [scan-build] Whitelist all -fXXXX options.
Liang Qi
cavendish.qi at gmail.com
Fri Oct 4 01:09:45 PDT 2013
Thanks for the review.
Sorry, I didn't checkout the latest file. It has been already fixed in
https://github.com/llvm-mirror/clang/commit/4aaedf03f5828c6fec07b28e723871ec7ef3ff5a.
On 3 October 2013 19:48, Anna Zaks <ganna at apple.com> wrote:
> Adding these should come after checking IgnoredOptionMap since some
> options need to be ignored.
> # Ignored options.
> if (defined $IgnoredOptionMap{$ArgKey}) {
> my $Cnt = $IgnoredOptionMap{$ArgKey};
> while ($Cnt > 0) {
> ++$i; --$Cnt;
> }
> next;
> }
>
> Also, I would have thought that the following would add the valid -f
> options to the command line. Why that does not work?
>
> if ($Arg =~ /^-f/) {
> push @CompileOpts,$Arg;
> push @LinkOpts,$Arg;
> next;
> }
>
> Thanks,
> Anna.
> On Oct 1, 2013, at 11:32 PM, Liang Qi <cavendish.qi at gmail.com> wrote:
>
> Hi,
>
> This change whitelists -fXXXX options. At least the use case here is to
> pass -fPIE and -fPIC to compiler, more talks in
> https://bugreports.qt-project.org/browse/QTBUG-33698 .
>
> Review appreciated.
>
> Regards,
> Liang
>
> http://llvm-reviews.chandlerc.com/D1805
>
> Files:
> tools/scan-build/ccc-analyzer
>
> Index: tools/scan-build/ccc-analyzer
> ===================================================================
> --- tools/scan-build/ccc-analyzer
> +++ tools/scan-build/ccc-analyzer
> @@ -488,6 +488,10 @@
> push @CompileOpts,$Arg;
> next;
> }
> + if ($Arg =~ /-f.*/) {
> + push @CompileOpts,$Arg;
> + next;
> + }
> # Handle the case where there isn't a space after -iquote
> if ($Arg =~ /-iquote.*/) {
> push @CompileOpts,$Arg;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
>
--
http://www.qiliang.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131004/f73941dc/attachment.html>
More information about the cfe-commits
mailing list