Clang Static Analyzer Question about Plists

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

Clang Static Analyzer Question about Plists

David Blaikie via cfe-dev
Hello all,

I am Trevor Huang, a student at University of Pennsylvania and one of my classmates, Gianluca Gross, recently asked some questions about Clang Static Analyzer for our senior design project. He forwarded us some responses from Alexey Sidorin and Gabor Horvath, so thank you so much for the assistance! 

One recommendation given to help us in our project is to use the plist output from scan-build instead of the html output for our parsing. I was looking through the contents of the plist and found that statements such "Taking true branch," and other statements in the bug trace that are in gray (instead of yellow) in the html report does not appear to be present in the plist format. I was wondering where those statements come from and if there is an easy way for me to include them if I only read the plist output.

Any and all help would be greatly appreciated. Thank you again!

Sincerely,
Trevor

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

Re: Clang Static Analyzer Question about Plists

David Blaikie via cfe-dev

Trevor:

If you're building automation, I highly encourage you to consider using the new Sarif output format.

Best,

-Paul

On 1/16/2019 3:45 PM, Trevor Huang via cfe-dev wrote:
Hello all,

I am Trevor Huang, a student at University of Pennsylvania and one of my classmates, Gianluca Gross, recently asked some questions about Clang Static Analyzer for our senior design project. He forwarded us some responses from Alexey Sidorin and Gabor Horvath, so thank you so much for the assistance! 

One recommendation given to help us in our project is to use the plist output from scan-build instead of the html output for our parsing. I was looking through the contents of the plist and found that statements such "Taking true branch," and other statements in the bug trace that are in gray (instead of yellow) in the html report does not appear to be present in the plist format. I was wondering where those statements come from and if there is an easy way for me to include them if I only read the plist output.

Any and all help would be greatly appreciated. Thank you again!

Sincerely,
Trevor

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-- 
Paul Anderson, VP of Engineering, GrammaTech, Inc.
531 Esty St., Ithaca, NY 14850
Tel: +1 607 273-7340 x118; http://www.grammatech.com

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

Re: Clang Static Analyzer Question about Plists

David Blaikie via cfe-dev
In reply to this post by David Blaikie via cfe-dev
Yeah, plist format is slightly different. Instead of grey notes that describe control flow as text, it describes control flow as "arrows" from one point in the source code to another. Eg., instead of writing "Taking true branch..." it'd list two (file, line, column) triples: one at the end of the branch condition, the other at the beginning of the true branch, and you can imagine this as an arrow from the first source location to the second source location. You can see how it's supposed to look on the top screenshot at http://clang-analyzer.llvm.org/

Hmm, there doesn't seem to be a way to override this decision right now. You can try tweaking PlistDiagnostics::getGenerationScheme(), i.e. change Extensive to Minimal, but i can't promise it won't crash when it tries to generate anything.



On 1/16/19 12:45 PM, Trevor Huang via cfe-dev wrote:
Hello all,

I am Trevor Huang, a student at University of Pennsylvania and one of my classmates, Gianluca Gross, recently asked some questions about Clang Static Analyzer for our senior design project. He forwarded us some responses from Alexey Sidorin and Gabor Horvath, so thank you so much for the assistance! 

One recommendation given to help us in our project is to use the plist output from scan-build instead of the html output for our parsing. I was looking through the contents of the plist and found that statements such "Taking true branch," and other statements in the bug trace that are in gray (instead of yellow) in the html report does not appear to be present in the plist format. I was wondering where those statements come from and if there is an easy way for me to include them if I only read the plist output.

Any and all help would be greatly appreciated. Thank you again!

Sincerely,
Trevor

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


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