summaryrefslogtreecommitdiff
path: root/lib/AST/StmtPrinter.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-07-24 17:54:45 +0000
committerSteve Naroff <snaroff@apple.com>2009-07-24 17:54:45 +0000
commitf242b1b0c4e998911cb96b2ba7e27ab4a5abaed3 (patch)
tree5b69e6d4f2903e89a5c70ffaa759820c7833259b /lib/AST/StmtPrinter.cpp
parentfc514abac21dbd801e2b665a1a24075c5ff62f44 (diff)
downloadclang-f242b1b0c4e998911cb96b2ba7e27ab4a5abaed3.tar.gz
clang-f242b1b0c4e998911cb96b2ba7e27ab4a5abaed3.tar.bz2
clang-f242b1b0c4e998911cb96b2ba7e27ab4a5abaed3.tar.xz
Allow front-end 'isa' access on object's of type 'id'.
Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning). Still need back-end CodeGen for ObjCIsaExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtPrinter.cpp')
-rw-r--r--lib/AST/StmtPrinter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index 26732d4d29..a5b0df8e45 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/lib/AST/StmtPrinter.cpp
@@ -739,6 +739,11 @@ void StmtPrinter::VisitMemberExpr(MemberExpr *Node) {
// representing anonymous unions/structs
OS << Node->getMemberDecl()->getNameAsString();
}
+void StmtPrinter::VisitObjCIsaExpr(ObjCIsaExpr *Node) {
+ PrintExpr(Node->getBase());
+ OS << (Node->isArrow() ? "->isa" : ".isa");
+}
+
void StmtPrinter::VisitExtVectorElementExpr(ExtVectorElementExpr *Node) {
PrintExpr(Node->getBase());
OS << ".";