thegameg created this revision. thegameg added reviewers: aaron.ballman, courbet. thegameg added a subscriber: cfe-commits. Herald added a subscriber: klimek.
The example is using `isInteger()` instead of `signed` / `unsigned` version. https://reviews.llvm.org/D23641 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h Index: include/clang/ASTMatchers/ASTMatchers.h =================================================================== --- include/clang/ASTMatchers/ASTMatchers.h +++ include/clang/ASTMatchers/ASTMatchers.h @@ -4161,7 +4161,7 @@ /// void b(unsigned long); /// void c(double); /// \endcode -/// functionDecl(hasAnyParameter(hasType(isInteger()))) +/// functionDecl(hasAnyParameter(hasType(isUnsignedInteger()))) /// matches "b(unsigned long)", but not "a(int)" and "c(double)". AST_MATCHER(QualType, isUnsignedInteger) { return Node->isUnsignedIntegerType(); @@ -4175,7 +4175,7 @@ /// void b(unsigned long); /// void c(double); /// \endcode -/// functionDecl(hasAnyParameter(hasType(isInteger()))) +/// functionDecl(hasAnyParameter(hasType(isSignedInteger()))) /// matches "a(int)", but not "b(unsigned long)" and "c(double)". AST_MATCHER(QualType, isSignedInteger) { return Node->isSignedIntegerType(); Index: docs/LibASTMatchersReference.html =================================================================== --- docs/LibASTMatchersReference.html +++ docs/LibASTMatchersReference.html @@ -3006,7 +3006,7 @@ void a(int); void b(unsigned long); void c(double); -functionDecl(hasAnyParameter(hasType(isInteger()))) +functionDecl(hasAnyParameter(hasType(isSignedInteger()))) matches "a(int)", but not "b(unsigned long)" and "c(double)". </pre></td></tr> @@ -3018,7 +3018,7 @@ void a(int); void b(unsigned long); void c(double); -functionDecl(hasAnyParameter(hasType(isInteger()))) +functionDecl(hasAnyParameter(hasType(isUnsignedInteger()))) matches "b(unsigned long)", but not "a(int)" and "c(double)". </pre></td></tr>
Index: include/clang/ASTMatchers/ASTMatchers.h =================================================================== --- include/clang/ASTMatchers/ASTMatchers.h +++ include/clang/ASTMatchers/ASTMatchers.h @@ -4161,7 +4161,7 @@ /// void b(unsigned long); /// void c(double); /// \endcode -/// functionDecl(hasAnyParameter(hasType(isInteger()))) +/// functionDecl(hasAnyParameter(hasType(isUnsignedInteger()))) /// matches "b(unsigned long)", but not "a(int)" and "c(double)". AST_MATCHER(QualType, isUnsignedInteger) { return Node->isUnsignedIntegerType(); @@ -4175,7 +4175,7 @@ /// void b(unsigned long); /// void c(double); /// \endcode -/// functionDecl(hasAnyParameter(hasType(isInteger()))) +/// functionDecl(hasAnyParameter(hasType(isSignedInteger()))) /// matches "a(int)", but not "b(unsigned long)" and "c(double)". AST_MATCHER(QualType, isSignedInteger) { return Node->isSignedIntegerType(); Index: docs/LibASTMatchersReference.html =================================================================== --- docs/LibASTMatchersReference.html +++ docs/LibASTMatchersReference.html @@ -3006,7 +3006,7 @@ void a(int); void b(unsigned long); void c(double); -functionDecl(hasAnyParameter(hasType(isInteger()))) +functionDecl(hasAnyParameter(hasType(isSignedInteger()))) matches "a(int)", but not "b(unsigned long)" and "c(double)". </pre></td></tr> @@ -3018,7 +3018,7 @@ void a(int); void b(unsigned long); void c(double); -functionDecl(hasAnyParameter(hasType(isInteger()))) +functionDecl(hasAnyParameter(hasType(isUnsignedInteger()))) matches "b(unsigned long)", but not "a(int)" and "c(double)". </pre></td></tr>
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits