[cfe-dev] static check, VisitBinaryOperator() function's problem

huc1985 huc1985 at 163.com
Tue Apr 2 00:29:25 PDT 2013

Hi, All!

I'm using a RecursiveASTVisitor and implementing its VisitBinaryOperator()
method to check the assign operation using "sizeof()".
    My test code like this:
    void main()
        int size = sizeof(MSG); //init 
        size = sizeof(MSG);     //assign

MSG is a struct; But i find that clang can't access VisitBinaryOperator().
And variable size does't have Init Expr in VisitVarDecl(). I have checked
AST,there is no BinaryOperator or other operation. I dont know why.

View this message in context: http://clang-developers.42468.n3.nabble.com/static-check-VisitBinaryOperator-function-s-problem-tp4031252.html
Sent from the Clang Developers mailing list archive at Nabble.com.

More information about the cfe-dev mailing list