clang AST visitor extra arguments -
currently clang's traverse* functions accept ast nodes sole argument. wondering if there way pass 1 or more arguments traverse* functions in clang's astvisitor.
for example, let's have binaryoperator
, want pass state when call traversestmt
on lhs , rhs:
traversestmt(lhs, state); ... traversestmt(rhs, state);
is there way achieve this?
one way avoid passing argument maintain local stack within astvisitor object. ugly!
thanks.
Comments
Post a Comment