summaryrefslogtreecommitdiffstats
path: root/include/clang-c
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-08 00:20:03 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-08 00:20:03 +0000
commit044e645605c6d75223e33d23e3c5701cb389969f (patch)
tree4a55c72b9c9f5a81190a75c0908db38621ba8ef6 /include/clang-c
parente286d9b8b19b24da5158ffeb17a7de03644f1009 (diff)
[libclang] Enhance clang_getOverriddenCursors.
Basically the current design is: -for an implementation method, show as overridden the interface method. This is not useful, and is inconsistent with the C++ side -for an interface method, show as overridden the protocols methods (this is desirable) and the methods from the categories; methods from categories are not useful since they are considered the same method (same USR). -If there is a protocol method or category method reported, it does not check the super class for overridden methods. This is really problematic since overridden methods from super class is what we want to give back. Change clang_getOverriddenCursors to show as overridden any method in the class's base class, its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). If no such method exists, the search continues to the class's superclass, its protocols, and its categories, and so on. A method from an Objective-C implementation is considered to override the same methods as its corresponding method in the interface. rdar://10967206 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c')
-rw-r--r--include/clang-c/Index.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index fd7a9f3a01..d05510e281 100644
--- a/include/clang-c/Index.h
+++ b/include/clang-c/Index.h
@@ -2219,11 +2219,12 @@ CINDEX_LINKAGE CXCursor clang_getCursorLexicalParent(CXCursor cursor);
* In both Objective-C and C++, a method (aka virtual member function,
* in C++) can override a virtual method in a base class. For
* Objective-C, a method is said to override any method in the class's
- * interface (if we're coming from an implementation), its protocols,
- * or its categories, that has the same selector and is of the same
- * kind (class or instance). If no such method exists, the search
- * continues to the class's superclass, its protocols, and its
- * categories, and so on.
+ * base class, its protocols, or its categories' protocols, that has the same
+ * selector and is of the same kind (class or instance).
+ * If no such method exists, the search continues to the class's superclass,
+ * its protocols, and its categories, and so on. A method from an Objective-C
+ * implementation is considered to override the same methods as its
+ * corresponding method in the interface.
*
* For C++, a virtual member function overrides any virtual member
* function with the same signature that occurs in its base