static check, VisitBinaryOperator() function's problem
This post was updated on .
I'm using a RecursiveASTVisitor and implementing its VisitBinaryOperator() method to check the assign operation using "sizeof()".
My test code like this, it's C code:
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.