Progress on message expressions...
- Add ObjcMessageExpr AST node and associated constructors.
- Add SourceLocation's to ActOnKeywordMessage/ActOnUnaryMessage API.
- Instantiate message expressions...
- Replace alloca usage with SmallString.
Next step, installing a correct type, among other tweaks...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42116 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/StmtPrinter.cpp b/AST/StmtPrinter.cpp
index 9e8f3e9..11dd2ef 100644
--- a/AST/StmtPrinter.cpp
+++ b/AST/StmtPrinter.cpp
@@ -612,6 +612,17 @@
OS << Node->getEncodedType().getAsString() << ")";
}
+void StmtPrinter::VisitObjCMessageExpr(ObjCMessageExpr *Mess) {
+ OS << "[";
+ PrintExpr(Mess->getReceiver());
+ for (unsigned i = 0, e = Mess->getNumArgs(); i != e; ++i) {
+ // FIXME: get/print keyword...
+ PrintExpr(Mess->getArg(i));
+ }
+ OS << "]";
+}
+
+
//===----------------------------------------------------------------------===//
// Stmt method implementations
//===----------------------------------------------------------------------===//