On Dec 7, 2010, at 1:33 AM, Benoit Perrot wrote:

> 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 only)
> 
> Shouldn't it be the following:
> 
>     #define OPERATOR(NAME) \
>         case BO_##NAME: DISPATCH(Bin##NAME, BinaryOperator, S);
> 
> ?

Fixed in r121266, thanks!

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to