diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-10-10 16:42:25 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-10-10 16:42:25 +0000 |
commit | 1e4691b9d8e1bdcc8ef62b323969d702c51b3c08 (patch) | |
tree | 74744754b0e6c30fd4014944f341ae6b0115dbbf /lib/Sema/SemaDeclObjC.cpp | |
parent | b5e4ace3161bd2c3f88f39e228ba8f6aaa15e751 (diff) |
Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor.
This more accurately reflects its use: this flag is set when a method
matches the getter or setter name for a property in the same class,
and does not actually specify whether or not the definition of the method
will be synthesized (either implicitly or explicitly with @synthesize).
This renames the setter and backing field as well, and changes the
(soon-to-be-obsolete?) XML dump format to use 'property_accessor'
instead of 'synthesized'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index adbcd7074e..38c05ff780 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -1578,9 +1578,9 @@ void Sema::CheckProtocolMethodDefs(SourceLocation ImpLoc, E = PDecl->instmeth_end(); I != E; ++I) { ObjCMethodDecl *method = *I; if (method->getImplementationControl() != ObjCMethodDecl::Optional && - !method->isSynthesized() && !InsMap.count(method->getSelector()) && - (!Super || - !Super->lookupInstanceMethod(method->getSelector()))) { + !method->isPropertyAccessor() && + !InsMap.count(method->getSelector()) && + (!Super || !Super->lookupInstanceMethod(method->getSelector()))) { // If a method is not implemented in the category implementation but // has been declared in its primary class, superclass, // or in one of their protocols, no need to issue the warning. @@ -1593,7 +1593,7 @@ void Sema::CheckProtocolMethodDefs(SourceLocation ImpLoc, if (ObjCMethodDecl *MethodInClass = IDecl->lookupInstanceMethod(method->getSelector(), true /*shallowCategoryLookup*/)) - if (C || MethodInClass->isSynthesized()) + if (C || MethodInClass->isPropertyAccessor()) continue; unsigned DIAG = diag::warn_unimplemented_protocol_method; if (Diags.getDiagnosticLevel(DIAG, ImpLoc) @@ -1654,7 +1654,7 @@ void Sema::MatchAllMethodDeclarations(const SelectorSet &InsMap, if (InsMapSeen.count((*I)->getSelector())) continue; InsMapSeen.insert((*I)->getSelector()); - if (!(*I)->isSynthesized() && + if (!(*I)->isPropertyAccessor() && !InsMap.count((*I)->getSelector())) { if (ImmediateClass) WarnUndefinedMethod(IMPDecl->getLocation(), *I, IncompleteImpl, @@ -1671,7 +1671,7 @@ void Sema::MatchAllMethodDeclarations(const SelectorSet &InsMap, if (!WarnCategoryMethodImpl) WarnConflictingTypedMethods(ImpMethodDecl, MethodDecl, isa<ObjCProtocolDecl>(CDecl)); - else if (!MethodDecl->isSynthesized()) + else if (!MethodDecl->isPropertyAccessor()) WarnExactTypedMethods(ImpMethodDecl, MethodDecl, isa<ObjCProtocolDecl>(CDecl)); } @@ -2372,11 +2372,11 @@ Decl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, CExtDecl; CExtDecl = CExtDecl->getNextClassExtension()) { if (ObjCMethodDecl *GetterMethod = CExtDecl->getInstanceMethod(Property->getGetterName())) - GetterMethod->setSynthesized(true); + GetterMethod->setPropertyAccessor(true); if (!Property->isReadOnly()) if (ObjCMethodDecl *SetterMethod = CExtDecl->getInstanceMethod(Property->getSetterName())) - SetterMethod->setSynthesized(true); + SetterMethod->setPropertyAccessor(true); } } } @@ -2824,7 +2824,7 @@ Decl *Sema::ActOnMethodDeclaration( ResultTInfo, CurContext, MethodType == tok::minus, isVariadic, - /*isSynthesized=*/false, + /*isPropertyAccessor=*/false, /*isImplicitlyDeclared=*/false, /*isDefined=*/false, MethodDeclKind == tok::objc_optional ? ObjCMethodDecl::Optional |