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 /tools | |
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 'tools')
-rw-r--r-- | tools/libclang/CIndex.cpp | 4 | ||||
-rw-r--r-- | tools/libclang/IndexDecl.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 3543a39f7a..78e4fc318f 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -1021,12 +1021,12 @@ bool CursorVisitor::VisitObjCPropertyDecl(ObjCPropertyDecl *PD) { // Visit synthesized methods since they will be skipped when visiting // the @interface. if (ObjCMethodDecl *MD = prevDecl->getGetterMethodDecl()) - if (MD->isSynthesized() && MD->getLexicalDeclContext() == CDecl) + if (MD->isPropertyAccessor() && MD->getLexicalDeclContext() == CDecl) if (Visit(MakeCXCursor(MD, TU, RegionOfInterest))) return true; if (ObjCMethodDecl *MD = prevDecl->getSetterMethodDecl()) - if (MD->isSynthesized() && MD->getLexicalDeclContext() == CDecl) + if (MD->isPropertyAccessor() && MD->getLexicalDeclContext() == CDecl) if (Visit(MakeCXCursor(MD, TU, RegionOfInterest))) return true; diff --git a/tools/libclang/IndexDecl.cpp b/tools/libclang/IndexDecl.cpp index 513038119d..4b6706fba7 100644 --- a/tools/libclang/IndexDecl.cpp +++ b/tools/libclang/IndexDecl.cpp @@ -194,7 +194,7 @@ public: bool VisitObjCMethodDecl(ObjCMethodDecl *D) { // Methods associated with a property, even user-declared ones, are // handled when we handle the property. - if (D->isSynthesized()) + if (D->isPropertyAccessor()) return true; handleObjCMethod(D); @@ -228,12 +228,12 @@ public: } if (ObjCMethodDecl *MD = PD->getGetterMethodDecl()) { - if (MD->isSynthesized()) + if (MD->isPropertyAccessor()) IndexCtx.handleSynthesizedObjCMethod(MD, D->getLocation(), D->getLexicalDeclContext()); } if (ObjCMethodDecl *MD = PD->getSetterMethodDecl()) { - if (MD->isSynthesized()) + if (MD->isPropertyAccessor()) IndexCtx.handleSynthesizedObjCMethod(MD, D->getLocation(), D->getLexicalDeclContext()); } |