About Clang Static Analyzer

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

About Clang Static Analyzer

Jiandong Wang
Hi, I'm now interested in Clang Static Analyzer. The related document says the analyzer is 100% open source and is part of the Clang project.  But is there anybody that can tell where to get the source code of it?  Any ideas?
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: About Clang Static Analyzer

Seo Sanghyeon-3
2010/5/12 Jiandong Wang <[hidden email]>:
> Hi, I'm now interested in Clang Static Analyzer. The related document says
> the analyzer is 100% open source and is part of the Clang project.  But is
> there anybody that can tell where to get the source code of it?  Any ideas?

It *is* a part of Clang, so you simply get the Clang source code.

Files of interest are mostly located under lib/Checker.

--
Seo Sanghyeon

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: About Clang Static Analyzer

Jiandong Wang
hi, sanghyeon. Thanks for your immediate reply. But what I'm expecting is a bundle of stand-alone codes allowing to analyze and build the analyzer. Can it be possible?

On Wed, May 12, 2010 at 4:15 PM, Seo Sanghyeon <[hidden email]> wrote:
2010/5/12 Jiandong Wang <[hidden email]>:
> Hi, I'm now interested in Clang Static Analyzer. The related document says
> the analyzer is 100% open source and is part of the Clang project.  But is
> there anybody that can tell where to get the source code of it?  Any ideas?

It *is* a part of Clang, so you simply get the Clang source code.

Files of interest are mostly located under lib/Checker.

--
Seo Sanghyeon


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: About Clang Static Analyzer

Jean-Daniel Dupas-2
The Analyzer is clang.

To use it you do

clang --analyze ...

So your stand-alone code is llvm + clang

check out llvm
checkout clang in llvm/tool/clang
go to the llvm dir

configure && make

and you're done.


Le 12 mai 2010 à 10:31, Jiandong Wang a écrit :

hi, sanghyeon. Thanks for your immediate reply. But what I'm expecting is a bundle of stand-alone codes allowing to analyze and build the analyzer. Can it be possible?

On Wed, May 12, 2010 at 4:15 PM, Seo Sanghyeon <[hidden email]> wrote:
2010/5/12 Jiandong Wang <[hidden email]>:
> Hi, I'm now interested in Clang Static Analyzer. The related document says
> the analyzer is 100% open source and is part of the Clang project.  But is
> there anybody that can tell where to get the source code of it?  Any ideas?

It *is* a part of Clang, so you simply get the Clang source code.

Files of interest are mostly located under lib/Checker.

--
Seo Sanghyeon

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-- Jean-Daniel





_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: About Clang Static Analyzer

Jiandong Wang
is that the case?  If it was true, it would be so frustrating.  Maybe I'll have to make another further research. Thank you all the same.

On Wed, May 12, 2010 at 5:09 PM, Jean-Daniel Dupas <[hidden email]> wrote:
The Analyzer is clang.

To use it you do

clang --analyze ...

So your stand-alone code is llvm + clang

check out llvm
checkout clang in llvm/tool/clang
go to the llvm dir

configure && make

and you're done.



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-- Jean-Daniel






_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: About Clang Static Analyzer

Ted Kremenek
Hi Jiandong,

As Jean-Daniel said, the analyzer itself is contained within a library.  The 'clang' executable simply links in that library and has some boilerplate logic to drive it.  You are perfectly free to use the analyzer logic in a different context.

On May 12, 2010, at 2:31 AM, Jiandong Wang wrote:

is that the case?  If it was true, it would be so frustrating.  Maybe I'll have to make another further research. Thank you all the same.

On Wed, May 12, 2010 at 5:09 PM, Jean-Daniel Dupas <[hidden email]> wrote:
The Analyzer is clang.

To use it you do

clang --analyze ...

So your stand-alone code is llvm + clang

check out llvm
checkout clang in llvm/tool/clang
go to the llvm dir

configure && make

and you're done.



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-- Jean-Daniel





_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: About Clang Static Analyzer

Alexei Svitkine
Is it possible to build a clang analyzer executable without requiring
building and linking LLVM?

Or does the analyzer actually depend on CodeGen?

-Alexei

On Wed, May 12, 2010 at 11:25 AM, Ted Kremenek <[hidden email]> wrote:

> Hi Jiandong,
> As Jean-Daniel said, the analyzer itself is contained within a library.  The
> 'clang' executable simply links in that library and has some boilerplate
> logic to drive it.  You are perfectly free to use the analyzer logic in a
> different context.
> On May 12, 2010, at 2:31 AM, Jiandong Wang wrote:
>
> is that the case?  If it was true, it would be so frustrating.  Maybe I'll
> have to make another further research. Thank you all the same.
>
> On Wed, May 12, 2010 at 5:09 PM, Jean-Daniel Dupas <[hidden email]>
> wrote:
>>
>> The Analyzer is clang.
>> To use it you do
>> clang --analyze ...
>> So your stand-alone code is llvm + clang
>> check out llvm
>> checkout clang in llvm/tool/clang
>> go to the llvm dir
>> configure && make
>> and you're done.
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>> -- Jean-Daniel
>>
>>
>>
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: About Clang Static Analyzer

Ted Kremenek
On May 13, 2010, at 5:02 PM, Alexei Svitkine wrote:

> Is it possible to build a clang analyzer executable without requiring
> building and linking LLVM?
>
> Or does the analyzer actually depend on CodeGen?
>
> -Alexei

It doesn't depend on CodeGen, but LLVM contains other supporting libraries that are used by the non-codegen aspects of Clang (e.g. libSupport).

Right now the driver executable for the clang analyzer is the same as the compiler (they are all in the executable 'clang').  There's nothing fundamental about them being in the same executable; that's just how they've been packaged.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev