aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/Expr.cpp4
-rw-r--r--lib/AST/StmtPrinter.cpp4
-rw-r--r--lib/AST/StmtSerialization.cpp11
-rw-r--r--lib/Sema/SemaExpr.cpp3
4 files changed, 2 insertions, 20 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 8cf3b37e85..97e1897424 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1259,10 +1259,6 @@ Stmt::child_iterator ObjCIvarRefExpr::child_end() { return &Base+1; }
Stmt::child_iterator ObjCPropertyRefExpr::child_begin() { return &Base; }
Stmt::child_iterator ObjCPropertyRefExpr::child_end() { return &Base+1; }
-// ObjCSuperRefExpr
-Stmt::child_iterator ObjCSuperRefExpr::child_begin() { return child_iterator();}
-Stmt::child_iterator ObjCSuperRefExpr::child_end() { return child_iterator(); }
-
// PredefinedExpr
Stmt::child_iterator PredefinedExpr::child_begin() { return child_iterator(); }
Stmt::child_iterator PredefinedExpr::child_end() { return child_iterator(); }
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index a9818f8fcd..7cd00dab50 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/lib/AST/StmtPrinter.cpp
@@ -476,10 +476,6 @@ void StmtPrinter::VisitDeclRefExpr(DeclRefExpr *Node) {
OS << Node->getDecl()->getName();
}
-void StmtPrinter::VisitObjCSuperRefExpr(ObjCSuperRefExpr *Node) {
- OS << "super";
-}
-
void StmtPrinter::VisitObjCIvarRefExpr(ObjCIvarRefExpr *Node) {
if (Node->getBase()) {
PrintExpr(Node->getBase());
diff --git a/lib/AST/StmtSerialization.cpp b/lib/AST/StmtSerialization.cpp
index cc26b278c3..99ca10d5be 100644
--- a/lib/AST/StmtSerialization.cpp
+++ b/lib/AST/StmtSerialization.cpp
@@ -1089,17 +1089,6 @@ ObjCStringLiteral* ObjCStringLiteral::CreateImpl(Deserializer& D, ASTContext& C)
return new ObjCStringLiteral(String,T,L);
}
-void ObjCSuperRefExpr::EmitImpl(Serializer& S) const {
- S.Emit(Loc);
- S.Emit(getType());
-}
-
-ObjCSuperRefExpr* ObjCSuperRefExpr::CreateImpl(Deserializer& D, ASTContext& C) {
- SourceLocation Loc = SourceLocation::ReadVal(D);
- QualType T = QualType::ReadVal(D);
- return new ObjCSuperRefExpr(T, Loc);
-}
-
//===----------------------------------------------------------------------===//
// C++ Serialization
//===----------------------------------------------------------------------===//
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index b44fd877d6..f68f82b87d 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -332,10 +332,11 @@ Sema::ExprResult Sema::ActOnIdentifierExpr(Scope *S, SourceLocation Loc,
static_cast<Expr*>(SelfExpr.Val), true, true);
}
}
+ // Needed to implement property "super.method" notation.
if (SD == 0 && !strcmp(II.getName(), "super")) {
QualType T = Context.getPointerType(Context.getObjCInterfaceType(
getCurMethodDecl()->getClassInterface()));
- return new ObjCSuperRefExpr(T, Loc);
+ return new PredefinedExpr(Loc, T, PredefinedExpr::ObjCSuper);
}
}