[cfe-dev] How does Clang Staic Analyzer deal with DeclRefExpr?

Jordan Rose jordan_rose at apple.com
Thu Dec 5 09:29:25 PST 2013


ParenExpr is pretty much always treated as transparent, so I don't feel bad about not allowing checkers to evaluate it. UnaryExprOrTypeTraitExpr can be completely evaluated by the compiler, so I'm not sure what sort of path-sensitive analysis you'd want there. (If you're just trying to check syntactic properties, an AST walk would be better.) MemberExpr should certainly have a pre-call check. Patches welcome?

(if not, I'll get to it soon-ish)
Jordan


On Dec 4, 2013, at 5:02 , Arthur Yoo <phjy007 at gmail.com> wrote:

> Thank you, Jordan. Your reply really helps me.
> 
> I have another question. Is it true that the Analyzer doesn't give checkers chances to evaluate UnaryExprOrTypeTraitExpr(sizeof/alignof), ParenExpr and MemberExpr? If I want to catch these kinds of Expr in my checker, what can I do? 
> 
> Thank you.
> 
> 
> -- 
> Best regards,
> 岳佳圆 | Yue Jiayuan | Arthur Yoo

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


More information about the cfe-dev mailing list