add a new ImaginaryLiteral AST node that is used to
represent imaginary literals:
float _Complex A;
void foo() {
A = 1.0iF;
}
generates:
(BinaryOperator 0x2305ec0 '_Complex float' '='
(DeclRefExpr 0x2305e60 '_Complex float' Decl='A' 0x2305cf0)
(ImaginaryLiteral 0x2305f40 '_Complex float'
(FloatingLiteral 0x2305ea0 'float' 1.000000))))
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41413 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/StmtDumper.cpp b/AST/StmtDumper.cpp
index 0a46cbc..0ac7a19 100644
--- a/AST/StmtDumper.cpp
+++ b/AST/StmtDumper.cpp
@@ -328,6 +328,14 @@
DumpExpr(Node);
fprintf(F, " %f)", Node->getValue());
}
+
+void StmtDumper::VisitImaginaryLiteral(ImaginaryLiteral *Node) {
+ DumpExpr(Node);
+ fprintf(F, "\n");
+ DumpSubTree(Node->getSubExpr());
+ fprintf(F, ")");
+}
+
void StmtDumper::VisitStringLiteral(StringLiteral *Str) {
DumpExpr(Str);
// FIXME: this doesn't print wstrings right.