[cfe-commits] r113626 - /cfe/trunk/include/clang/AST/ExprObjC.h
Ted Kremenek
kremenek at apple.com
Fri Sep 10 13:55:53 PDT 2010
Author: kremenek
Date: Fri Sep 10 15:55:52 2010
New Revision: 113626
URL: http://llvm.org/viewvc/llvm-project?rev=113626&view=rev
Log:
Make 'setProperty()', 'setBase()', and 'setLocation()' private in ObjCPropertyRefExpr, and friend ASTStmtReader so that it is the only class that can use them.
Modified:
cfe/trunk/include/clang/AST/ExprObjC.h
Modified: cfe/trunk/include/clang/AST/ExprObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprObjC.h?rev=113626&r1=113625&r2=113626&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprObjC.h (original)
+++ cfe/trunk/include/clang/AST/ExprObjC.h Fri Sep 10 15:55:52 2010
@@ -242,14 +242,11 @@
: 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 @@
// 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
More information about the cfe-commits
mailing list