From 99b57fb987ac846306459e95de19472b2a9ae609 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Sun, 21 Jun 2009 18:26:03 +0000 Subject: [PATCH] Renamed Protocol as TheProtocol so people can use clang header for building obj-c++ clients. "Protocol" is a class name in Cocoa.h llvm-svn: 73854 --- clang/include/clang/AST/ExprObjC.h | 8 ++++---- clang/lib/AST/Expr.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clang/include/clang/AST/ExprObjC.h b/clang/include/clang/AST/ExprObjC.h index ef78c4081e34..e00833b5820e 100644 --- a/clang/include/clang/AST/ExprObjC.h +++ b/clang/include/clang/AST/ExprObjC.h @@ -138,20 +138,20 @@ public: /// obj conformsToProtocol:@protocol(foo)] /// The return type is "Protocol*". class ObjCProtocolExpr : public Expr { - ObjCProtocolDecl *Protocol; + ObjCProtocolDecl *TheProtocol; SourceLocation AtLoc, RParenLoc; public: ObjCProtocolExpr(QualType T, ObjCProtocolDecl *protocol, SourceLocation at, SourceLocation rp) - : Expr(ObjCProtocolExprClass, T), Protocol(protocol), + : Expr(ObjCProtocolExprClass, T), TheProtocol(protocol), AtLoc(at), RParenLoc(rp) {} explicit ObjCProtocolExpr(EmptyShell Empty) : Expr(ObjCProtocolExprClass, Empty) {} ObjCProtocolExpr *Clone(ASTContext &C) const; - ObjCProtocolDecl *getProtocol() const { return Protocol; } - void setProtocol(ObjCProtocolDecl *P) { Protocol = P; } + ObjCProtocolDecl *getProtocol() const { return TheProtocol; } + void setProtocol(ObjCProtocolDecl *P) { TheProtocol = P; } SourceLocation getAtLoc() const { return AtLoc; } SourceLocation getRParenLoc() const { return RParenLoc; } diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index eb4136c2e2a1..4a3ad2641ef4 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -1571,7 +1571,7 @@ ObjCSelectorExpr *ObjCSelectorExpr::Clone(ASTContext &C) const { } ObjCProtocolExpr *ObjCProtocolExpr::Clone(ASTContext &C) const { - return new (C) ObjCProtocolExpr(getType(), Protocol, AtLoc, RParenLoc); + return new (C) ObjCProtocolExpr(getType(), TheProtocol, AtLoc, RParenLoc); } // constructor for class messages.