English 中文(简体)
Clang static analyzer on Windows
原标题:

Does anybody have any success running clang static analyzer on Windows?

I have successfully built llvm and clang (using VS 2008). Running scan-build results in the following error:

The getpwuid function is unimplemented at scan-build line 35.

Some research shows that getpwuid is not supported on Windows platforms.

最佳回答

change the call to ...

my $UserName =  HtmlEscape( unknown )

scan-build is a perl script, so will need some handy fixes to execute scan build on windows.. these are

-> point those variables to look at the absolute physical path

my $ClangSB, my $Clang; $Dir = "/tmp"; my $Cmd ; and my $CmdCXX

please remember, that my $Cmd ; and my $CmdCXX is path of ccc-analyzer and c++-analyzer ... which are also perl scripts, so please place a perl -w in front of absolute path string..

and also disable the variable check right after declaration...

! -x $blaBla is problematic on windows...

beside you will also need these changes

--> CHANGE

open(PIPE, "-|", $Clang, "-cc1", "-help") or

to

open(PIPE, "-|", "$Clang"." -cc1"." -help") or

surprise, scan-build is working on windows.. :)

问题回答

暂无回答




相关问题
How to speed up Visual Studio 2008? Add more resources?

I m using Visual Studio 2008 (with the latest service pack) I also have ReSharper 4.5 installed. ReSharper Code analysis/ scan is turned off. OS: Windows 7 Enterprise Edition It takes me a long time ...

Trouble with VS.PHP installing it s own Apache server

I tried installing VS.PHP some time ago. I was intent on seeing how it works with my current setup. I immediately encountered trouble: none of my sites wanted to render. On windows, I m using WAMP ...

Jquery and Intellisense in VS 2008 with hotfix and SP1

I followed Scott Guthrie s instructions as outlined at http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx but no avail: intellisense still doesn t work. Any tips?

Fixing "error C2065: undeclared identifier"

First off, I m completely out of my depth here. So the question might be the wrong one to ask, but here goes... As per the accepted answer to this question, I m trying to compile the bindings for the ...

View whitespace in VS2008

After Jeph most recent post: http://www.codinghorror.com/blog/archives/001310.html, I thought to myself it would be fun to see if any of my code has those trailing whitespaces. So I open Visual ...

热门标签