summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-01-08 20:15:03 +0000
committerSteve Naroff <snaroff@apple.com>2009-01-08 20:15:03 +0000
commite538c5f3ae285ad47f0c314cc78c4ccc582f4447 (patch)
treed8596ab92e38d7f2d060e3433f023edd12468925 /clang/lib/AST
parent11b387fee0bd2407201d946022464be396a7b4c7 (diff)
downloadbcm5719-llvm-e538c5f3ae285ad47f0c314cc78c4ccc582f4447.tar.gz
bcm5719-llvm-e538c5f3ae285ad47f0c314cc78c4ccc582f4447.zip
Removed ObjCContainerDecl::getPropertyMethods()...doesn't belong in the AST.
Moved logic to Sema::ProcessPropertyDecl(). llvm-svn: 61936
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/DeclObjC.cpp72
1 files changed, 0 insertions, 72 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index 05d7e114953..2263af7d906 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -449,78 +449,6 @@ unsigned ObjCContainerDecl::getNumClassMethods() const {
return sum;
}
-/// addPropertyMethods - Goes through list of properties declared in this class
-/// and builds setter/getter method declartions depending on the setter/getter
-/// attributes of the property.
-///
-void ObjCContainerDecl::getPropertyMethods(
- ASTContext &Context, ObjCPropertyDecl *property,
- ObjCMethodDecl *& GetterDecl, ObjCMethodDecl *&SetterDecl) {
- // FIXME: The synthesized property we set here is misleading. We
- // almost always synthesize these methods unless the user explicitly
- // provided prototypes (which is odd, but allowed). Sema should be
- // typechecking that the declarations jive in that situation (which
- // it is not currently).
-
- // Find the default getter and if one not found, add one.
- if (!GetterDecl) {
- // No instance method of same name as property getter name was found.
- // Declare a getter method and add it to the list of methods
- // for this class.
- GetterDecl =
- ObjCMethodDecl::Create(Context, property->getLocation(),
- property->getLocation(),
- property->getGetterName(),
- property->getType(), this,
- true, false, true,
- (property->getPropertyImplementation() ==
- ObjCPropertyDecl::Optional) ?
- ObjCMethodDecl::Optional :
- ObjCMethodDecl::Required);
- }
- else
- // A user declared getter will be synthesize when @synthesize of
- // the property with the same name is seen in the @implementation
- GetterDecl->setIsSynthesized();
- property->setGetterMethodDecl(GetterDecl);
-
- // Skip setter if property is read-only.
- if (property->isReadOnly())
- return;
-
- // Find the default setter and if one not found, add one.
- if (!SetterDecl) {
- // No instance method of same name as property setter name was found.
- // Declare a setter method and add it to the list of methods
- // for this class.
- SetterDecl =
- ObjCMethodDecl::Create(Context, property->getLocation(),
- property->getLocation(),
- property->getSetterName(),
- Context.VoidTy, this,
- true, false, true,
- (property->getPropertyImplementation() ==
- ObjCPropertyDecl::Optional) ?
- ObjCMethodDecl::Optional :
- ObjCMethodDecl::Required);
- // Invent the arguments for the setter. We don't bother making a
- // nice name for the argument.
- ParmVarDecl *Argument = ParmVarDecl::Create(Context,
- SetterDecl,
- SourceLocation(),
- property->getIdentifier(),
- property->getType(),
- VarDecl::None,
- 0, 0);
- SetterDecl->setMethodParams(&Argument, 1);
- }
- else
- // A user declared setter will be synthesize when @synthesize of
- // the property with the same name is seen in the @implementation
- SetterDecl->setIsSynthesized();
- property->setSetterMethodDecl(SetterDecl);
-}
-
/// mergeProperties - Adds properties to the end of list of current properties
/// for this category.
OpenPOWER on IntegriCloud