diff options
author | Chris Lattner <sabre@nondot.org> | 2007-08-26 21:40:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-08-26 21:40:28 +0000 |
commit | d65598daa3f1bd397ea2dd07155ac49f2497a24f (patch) | |
tree | f35f522cd8f42e3bd5a65366554c3d85d055e1c5 | |
parent | 2c666fa40dd7103ea23260869f4200a65f25990f (diff) | |
download | bcm5719-llvm-d65598daa3f1bd397ea2dd07155ac49f2497a24f.tar.gz bcm5719-llvm-d65598daa3f1bd397ea2dd07155ac49f2497a24f.zip |
dispatch to functions like VisitBinRemAssign with knowledge that
the operand is of type CompoundAssignOperator, not just BinaryOperator.
llvm-svn: 41459
-rw-r--r-- | clang/include/clang/AST/StmtVisitor.h | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/clang/include/clang/AST/StmtVisitor.h b/clang/include/clang/AST/StmtVisitor.h index 426e09a4759..38a38322f63 100644 --- a/clang/include/clang/AST/StmtVisitor.h +++ b/clang/include/clang/AST/StmtVisitor.h @@ -55,16 +55,26 @@ public: case BinaryOperator::LAnd: DISPATCH(BinLAnd, BinaryOperator); case BinaryOperator::LOr : DISPATCH(BinLOr, BinaryOperator); case BinaryOperator::Assign: DISPATCH(BinAssign, BinaryOperator); - case BinaryOperator::MulAssign: DISPATCH(BinMulAssign, BinaryOperator); - case BinaryOperator::DivAssign: DISPATCH(BinDivAssign, BinaryOperator); - case BinaryOperator::RemAssign: DISPATCH(BinRemAssign, BinaryOperator); - case BinaryOperator::AddAssign: DISPATCH(BinAddAssign, BinaryOperator); - case BinaryOperator::SubAssign: DISPATCH(BinSubAssign, BinaryOperator); - case BinaryOperator::ShlAssign: DISPATCH(BinShlAssign, BinaryOperator); - case BinaryOperator::ShrAssign: DISPATCH(BinShrAssign, BinaryOperator); - case BinaryOperator::AndAssign: DISPATCH(BinAndAssign, BinaryOperator); - case BinaryOperator::OrAssign: DISPATCH(BinOrAssign, BinaryOperator); - case BinaryOperator::XorAssign: DISPATCH(BinXorAssign, BinaryOperator); + case BinaryOperator::MulAssign: + DISPATCH(BinMulAssign, CompoundAssignOperator); + case BinaryOperator::DivAssign: + DISPATCH(BinDivAssign, CompoundAssignOperator); + case BinaryOperator::RemAssign: + DISPATCH(BinRemAssign, CompoundAssignOperator); + case BinaryOperator::AddAssign: + DISPATCH(BinAddAssign, CompoundAssignOperator); + case BinaryOperator::SubAssign: + DISPATCH(BinSubAssign, CompoundAssignOperator); + case BinaryOperator::ShlAssign: + DISPATCH(BinShlAssign, CompoundAssignOperator); + case BinaryOperator::ShrAssign: + DISPATCH(BinShrAssign, CompoundAssignOperator); + case BinaryOperator::AndAssign: + DISPATCH(BinAndAssign, CompoundAssignOperator); + case BinaryOperator::OrAssign: + DISPATCH(BinOrAssign, CompoundAssignOperator); + case BinaryOperator::XorAssign: + DISPATCH(BinXorAssign, CompoundAssignOperator); case BinaryOperator::Comma: DISPATCH(BinComma, BinaryOperator); } } else if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(S)) { |