how can i get ud-chain of variable in checker?

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

how can i get ud-chain of variable in checker?

Hans Wennborg via cfe-dev

i did clang static analyzer checker guide and i build it. it works successfully.

and i have a 2 question.

Q1. I know that the Clang tool provides a du-chain. how can i get du(define-use)-chain in checker? - i need du-chain for analysis

Q2. Analyze a file with the specified checker is fail. normal package checker is works.

$clang --analyze -Xanalyzer -analyzer-checker=alpha test.c

-> it works.

$clang --analyze -Xanalyzer -analyzer-checker=alpha.core test.c

-> it fail. (I guess the argument changed.)

image ::  https://i.stack.imgur.com/XTY5r.png


my env is win 10/ LLVM,CLNAG 8.0/ include MinGW envPATH / vs2019

thank you for reading :3


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: how can i get ud-chain of variable in checker?

Hans Wennborg via cfe-dev
I tagged a few folks who could answer the first one :)

On Mon, 3 Feb 2020 at 16:40, 종모님 via cfe-dev <[hidden email]> wrote:

i did clang static analyzer checker guide and i build it. it works successfully.

and i have a 2 question.

Q1. I know that the Clang tool provides a du-chain. how can i get du(define-use)-chain in checker? - i need du-chain for analysis

Q2. Analyze a file with the specified checker is fail. normal package checker is works.

$clang --analyze -Xanalyzer -analyzer-checker=alpha test.c

-> it works.

$clang --analyze -Xanalyzer -analyzer-checker=alpha.core test.c

-> it fail. (I guess the argument changed.)

image ::  https://i.stack.imgur.com/XTY5r.png


The list of checkers need to be comma-separated.

clang --analyze -Xanalyzer -analyzer-checker=alpha,core test.c
---OR---
clang --analyze -Xanalyzer -analyzer-checker=alpha -Xanalyzer -analyzer-checker=core test.c

Mind that if you don't invoke the analyzer through the frontend (using the -cc1 flag), the core package is always be enabled. If you do, you definitely should enable it by hand!

 

my env is win 10/ LLVM,CLNAG 8.0/ include MinGW envPATH / vs2019

thank you for reading :3

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: how can i get ud-chain of variable in checker?

Hans Wennborg via cfe-dev


On 2/4/20 1:05 PM, Kristóf Umann via cfe-dev wrote:

> I tagged a few folks who could answer the first one :)
>
> On Mon, 3 Feb 2020 at 16:40, 종모님 via cfe-dev <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     i did clang static analyzer checker guide and i build it. it works
>     successfully.
>
>     and i have a 2 question.
>
>     Q1. I know that the Clang tool provides a du-chain. how can i get
>     du(define-use)-chain in checker? - i need du-chain for analysis
>
>     Q2. Analyze a file with the specified checker is fail. normal
>     package checker is works.
>
>     |$clang --analyze -Xanalyzer -analyzer-checker=alpha test.c |
>
>     -> it works.
>
>     |$clang --analyze -Xanalyzer -analyzer-checker=alpha.core test.c |
>
>     -> it fail. (I guess the argument changed.)
>
>     i <https://i.stack.imgur.com/XTY5r.png>mage ::
>     https://i.stack.imgur.com/XTY5r.png
>
>
> The list of checkers need to be comma-separated.

`alpha.core` is a valid package though.

Based on how highlighting looks on the screenshot, i suspect there must
be some invisible unicode whitespace symbol before the `.`.

>
> clang --analyze -Xanalyzer -analyzer-checker=alpha,core test.c
> ---OR---
> clang --analyze -Xanalyzer -analyzer-checker=alpha -Xanalyzer
> -analyzer-checker=core test.c
>
> Mind that if you don't invoke the analyzer through the frontend (using
> the -cc1 flag), the core package is always be enabled. If you do, you
> definitely should enable it by hand!
>
>     my env is win 10/ LLVM,CLNAG 8.0/ include MinGW envPATH / vs2019
>
>     thank you for reading :3
>
>     _______________________________________________
>     cfe-dev mailing list
>     [hidden email] <mailto:[hidden email]>
>     https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev