[PATCH] D12471: Correct documentation for numSelectorArgs matcher

Dave Lee via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 29 21:30:53 PDT 2015


kastiglione created this revision.
kastiglione added a reviewer: modocache.
kastiglione added a subscriber: cfe-commits.
Herald added a subscriber: klimek.

Currently, the documentation for `numSelectorArgs` includes an incorrect example. It shows a case where an argument of 1 will match a property getter, but a getter will be matched only when `N == 0`.

This diff corrects the documentation.

http://reviews.llvm.org/D12471

Files:
  include/clang/ASTMatchers/ASTMatchers.h

Index: include/clang/ASTMatchers/ASTMatchers.h
===================================================================
--- include/clang/ASTMatchers/ASTMatchers.h
+++ include/clang/ASTMatchers/ASTMatchers.h
@@ -2139,7 +2139,7 @@
 
 /// \brief Matches when the selector has the specified number of arguments
 ///
-///  matcher = objCMessageExpr(numSelectorArgs(1));
+///  matcher = objCMessageExpr(numSelectorArgs(0));
 ///  matches self.bodyView in the code below
 ///
 ///  matcher = objCMessageExpr(numSelectorArgs(2));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12471.33520.patch
Type: text/x-patch
Size: 518 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150830/81dfb8b3/attachment.bin>


More information about the cfe-commits mailing list