Hello,
When playing with (inheriting from) "RecursiveASTVisitor", I observed
that "::TraverseBinAssign" and other traversers of binary operators were
never called, except "::TraverseBinPtrMemD".
My investigations led me to the implementation of
"RecursiveASTVisitor<Derived>::TraverseStmt" (line 386 of
RecursiveASTVisitor.h), which says (line 393):
if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(S)) {
switch (BinOp->getOpcode()) {
#define OPERATOR(NAME) \
case BO_##NAME: DISPATCH(Bin##PtrMemD, BinaryOperator, S);
(See how every case of the switch actually dispatch to BinPtrMemD functions
only)
Shouldn't it be the following?
#define OPERATOR(NAME) \
case BO_##NAME: DISPATCH(Bin##NAME, BinaryOperator, S);
Regards,
dispatch-binop.patch (530 Bytes)