[PATCH][Review request][analyzer] scan-build for windows

Anton Yartsev anton.yartsev at gmail.com
Fri Apr 26 11:26:42 PDT 2013


On 22.04.2013 23:51, Jordan Rose wrote:
>    Better MinGW support is certainly welcome! A few comments, though...
>
>
> ================
> Comment at: tools/scan-build/scan-build:1563
> @@ -1562,3 +1562,3 @@
>   $ClangCXX = $Clang;
> -$ClangCXX =~ s/\-\d+\.\d+$//;
> -$ClangCXX .= "++";
> +if($^O =~/msys/) {
> +  $ClangCXX =~ s/.exe$/++.exe/;
> ----------------
> Not being a native Perl hacker, I found this a bit confusing. `$OSNAME` would have been a bit friendlier.
>
> Also, this check //only// handles MinGW, correct? http://perldoc.perl.org/perlvar.html#General-Variables says that native Windows returns "MSWin32" here.
>
> ================
> Comment at: tools/scan-build/c++-analyzer.win:3
> @@ +2,2 @@
> +
> +system ("ccc-analyzer @ARGV");
> ----------------
> The reason we have c++-analyzer at all is so that we can set run the underlying compilation with a C++ compiler. Simply forwarding c++-analyzer.win to ccc-analyzer won't actually accomplish that -- you'll have to add a flag or enviroment variable check to ccc-analyzer, which c++-analyzer.win can set before invoking ccc-analyzer.
>
> Also, are you sure this won't destroy arguments with spaces in them? (You can test with something like `"-DSTR=macro with spaces"`.)
>
>
> http://llvm-reviews.chandlerc.com/D703
Thanx for the review, all of your fears were confirmed.
Attached is a new patch.

Temporary excluded phabricator from recipients.

-- 
Anton

-------------- next part --------------
A non-text attachment was scrubbed...
Name: scan-build-for-win.patch
Type: text/x-diff
Size: 3474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130426/55577707/attachment.patch>


More information about the cfe-commits mailing list