[cfe-commits] r73854 - in /cfe/trunk: include/clang/AST/ExprObjC.h lib/AST/Expr.cpp

Daniel Dunbar daniel at zuster.org
Sun Jun 21 12:24:13 PDT 2009


I don't understand this change, does lookup in Obj-C++ not find the
member variable before the class at global scope?

 - Daniel

On Sun, Jun 21, 2009 at 11:26 AM, Fariborz Jahanian<fjahanian at apple.com> wrote:
> Author: fjahanian
> Date: Sun Jun 21 13:26:03 2009
> New Revision: 73854
>
> URL: http://llvm.org/viewvc/llvm-project?rev=73854&view=rev
> Log:
> Renamed Protocol as TheProtocol so people can use clang header for
> building obj-c++ clients. "Protocol" is a class name in Cocoa.h
>
> Modified:
>    cfe/trunk/include/clang/AST/ExprObjC.h
>    cfe/trunk/lib/AST/Expr.cpp
>
> Modified: cfe/trunk/include/clang/AST/ExprObjC.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprObjC.h?rev=73854&r1=73853&r2=73854&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/AST/ExprObjC.h (original)
> +++ cfe/trunk/include/clang/AST/ExprObjC.h Sun Jun 21 13:26:03 2009
> @@ -138,20 +138,20 @@
>  ///   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; }
>
> Modified: cfe/trunk/lib/AST/Expr.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=73854&r1=73853&r2=73854&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/AST/Expr.cpp (original)
> +++ cfe/trunk/lib/AST/Expr.cpp Sun Jun 21 13:26:03 2009
> @@ -1571,7 +1571,7 @@
>  }
>
>  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.
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list