aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-09-10 20:55:52 +0000
committerTed Kremenek <kremenek@apple.com>2010-09-10 20:55:52 +0000
commitf8730d7c313c421d5d7a2b9d97541fc89d5a52d4 (patch)
treea6caee74a991a9f3b2b937031209dee13aa8c4dd
parent2a822c0c554a7b82ea2cb0f7545e4ed1062f29fc (diff)
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
-rw-r--r--include/clang/AST/ExprObjC.h8
1 files changed, 5 insertions, 3 deletions
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<Expr>(Base); }
Expr *getBase() { return cast<Expr>(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