From: Ted Kremenek Date: Fri, 10 Sep 2010 20:55:52 +0000 (+0000) Subject: Make 'setProperty()', 'setBase()', and 'setLocation()' private in ObjCPropertyRefExpr... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8730d7c313c421d5d7a2b9d97541fc89d5a52d4;p=clang Make 'setProperty()', 'setBase()', and 'setLocation()' private in ObjCPropertyRefExpr, and friend ASTStmtReader so that it is the only class that can use them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113626 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/ExprObjC.h b/include/clang/AST/ExprObjC.h index 8a09f4e9a6..15b70075cb 100644 --- a/include/clang/AST/ExprObjC.h +++ b/include/clang/AST/ExprObjC.h @@ -242,14 +242,11 @@ public: : Expr(ObjCPropertyRefExprClass, Empty) {} ObjCPropertyDecl *getProperty() const { return AsProperty; } - void setProperty(ObjCPropertyDecl *D) { AsProperty = D; } const Expr *getBase() const { return cast(Base); } Expr *getBase() { return cast(Base); } - void setBase(Expr *base) { Base = base; } SourceLocation getLocation() const { return IdLoc; } - void setLocation(SourceLocation L) { IdLoc = L; } virtual SourceRange getSourceRange() const { return SourceRange(getBase()->getLocStart(), IdLoc); @@ -263,6 +260,11 @@ public: // Iterators virtual child_iterator child_begin(); virtual child_iterator child_end(); +private: + friend class ASTStmtReader; + void setProperty(ObjCPropertyDecl *D) { AsProperty = D; } + void setBase(Expr *base) { Base = base; } + void setLocation(SourceLocation L) { IdLoc = L; } }; /// ObjCImplicitSetterGetterRefExpr - A dot-syntax expression to access two