print the computation type for compound assignment operators in dumps.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41361 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/StmtDumper.cpp b/AST/StmtDumper.cpp
index cf1eab1..25caaef 100644
--- a/AST/StmtDumper.cpp
+++ b/AST/StmtDumper.cpp
@@ -425,7 +425,12 @@
}
void StmtDumper::VisitBinaryOperator(BinaryOperator *Node) {
DumpExpr(Node);
- fprintf(F, " '%s'\n", BinaryOperator::getOpcodeStr(Node->getOpcode()));
+ fprintf(F, " '%s'", BinaryOperator::getOpcodeStr(Node->getOpcode()));
+ if (CompoundAssignOperator *CAO = dyn_cast<CompoundAssignOperator>(Node)) {
+ fprintf(F, " ComputeTy=");
+ DumpType(CAO->getComputationType());
+ }
+ fprintf(F, "\n");
DumpSubTree(Node->getLHS());
fprintf(F, "\n");
DumpSubTree(Node->getRHS());