[PATCH] D23641: [ASTMatchers] Fix documentation of is(Un)SignedInteger()

Visoiu Mistrih Francis via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 17 19:51:12 PDT 2016


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>
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23641.68476.patch
Type: text/x-patch
Size: 1670 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160818/017c49cd/attachment-0001.bin>


More information about the cfe-commits mailing list