[cfe-dev] How to judge whether a local variable is read or written

George Karpenkov via cfe-dev cfe-dev at lists.llvm.org
Wed Jun 13 19:49:19 PDT 2018


Hi,

You might want to consult a video “how to write a checker in 24 hours” 
(video: https://www.youtube.com/watch?v=kdxlsP5QVPw&feature=youtu.be <https://www.youtube.com/watch?v=kdxlsP5QVPw&feature=youtu.be>, slides: http://llvm.org/devmtg/2012-11/Zaks-Rose-Checker24Hours.pdf <http://llvm.org/devmtg/2012-11/Zaks-Rose-Checker24Hours.pdf>).
There’s also more extensive documentation in PDF: https://github.com/haoNoQ/clang-analyzer-guide/releases <https://github.com/haoNoQ/clang-analyzer-guide/releases>

Basically, you define a checker, and the checker can have callbacks when events of interest occur,
which include reading or writing into local variables.

George

> On Jun 4, 2018, at 5:24 PM, 牛治 via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Dear developers:
> 
> How to judge whether a local variable is read or written in CSA,Can you provide a method ?thank you very much.
> 发自我的 iPhone
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180613/68152c6b/attachment.html>


More information about the cfe-dev mailing list