]> granicus.if.org Git - clang/commitdiff
Document CheckObjCMethodOverrides
authorDouglas Gregor <dgregor@apple.com>
Mon, 13 Jun 2011 16:07:18 +0000 (16:07 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 13 Jun 2011 16:07:18 +0000 (16:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132917 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclObjC.cpp

index de9097e98b4fd5855b9552707783ecee53330821..bfa2ef45d08de78a2d3324ea7d090bd4c1d524da 100644 (file)
@@ -73,7 +73,15 @@ bool Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod,
   return false;
 }
 
-
+/// \brief Check for consistency between a given method declaration and the
+/// methods it overrides within the class hierarchy.
+///
+/// This method walks the inheritance hierarchy starting at the given 
+/// declaration context (\p DC), invoking Sema::CheckObjCMethodOverride() with
+/// the given new method (\p NewMethod) and any method it directly overrides
+/// in the hierarchy. Sema::CheckObjCMethodOverride() is responsible for
+/// checking consistency, e.g., among return types for methods that return a 
+/// related result type.
 static bool CheckObjCMethodOverrides(Sema &S, ObjCMethodDecl *NewMethod,
                                      DeclContext *DC, 
                                      bool SkipCurrent = true) {