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)); Index: unittests/ASTMatchers/ASTMatchersTest.cpp =================================================================== --- unittests/ASTMatchers/ASTMatchersTest.cpp +++ unittests/ASTMatchers/ASTMatchersTest.cpp @@ -4870,6 +4870,9 @@ objcMessageExpr(hasSelector("contents"), hasUnarySelector()))); EXPECT_TRUE(matchesObjC( Objc1String, + objcMessageExpr(hasSelector("contents"), numSelectorArgs(0)))); + EXPECT_TRUE(matchesObjC( + Objc1String, objcMessageExpr(matchesSelector("uppercase*"), argumentCountIs(0) )));