mibintc added a comment.

If I change StmtVisitor to send compound assignment opcodes to BinaryOperator, 
then 12 clang LIT tests fail, all related to compound assignment mishandling, 
i.e. this patch

- a/clang/include/clang/AST/StmtVisitor.h

+++ b/clang/include/clang/AST/StmtVisitor.h
@@ -143,7 +143,7 @@ public:

  // methods, fall back on VisitCompoundAssignOperator.

#define CAO_FALLBACK(NAME)                                                     \

  RetTy VisitBin##NAME(PTR(BinaryOperator) S, ParamTys... P) {                 \

- DISPATCH(BinAssign, BinaryOperator);                                       \

+    DISPATCH(BinaryOperator, BinaryOperator);                                  
     \

  }
  CAO_FALLBACK(MulAssign) CAO_FALLBACK(DivAssign) CAO_FALLBACK(RemAssign)
  CAO_FALLBACK(AddAssign) CAO_FALLBACK(SubAssign) CAO_FALLBACK(ShlAssign)

These clang lit tests fail,
Failing Tests (12):

  Clang :: CXX/drs/dr2xx.cpp
  Clang :: CXX/expr/expr.const/p2-0x.cpp
  Clang :: CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p17.cpp
  Clang :: CodeGenCXX/const-init-cxx1y.cpp
  Clang :: CodeGenCXX/const-init-cxx2a.cpp
  Clang :: CodeGenCXX/non-const-init-cxx2a.cpp
  Clang :: Sema/warn-unsequenced.c
  Clang :: SemaCXX/constant-expression-cxx1y.cpp
  Clang :: SemaCXX/constant-expression-cxx2a.cpp
  Clang :: SemaCXX/decomposed-condition.cpp
  Clang :: SemaCXX/integer-overflow.cpp
  Clang :: SemaCXX/warn-unsequenced.cpp


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76384/new/

https://reviews.llvm.org/D76384



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to