summaryrefslogtreecommitdiffstats
path: root/clang/docs/LibASTMatchersReference.html
Commit message (Collapse)AuthorAgeFilesLines
...
* Regenerated AST Matchers doc.Alexander Kornienko2018-04-301-6/+8
| | | | | | Backported a minor fix to the comment in the header. llvm-svn: 331207
* Fix typos in clangAlexander Kornienko2018-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of: archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.) Differential revision: https://reviews.llvm.org/D44188 llvm-svn: 329399
* [ASTMatchers] Introduce a matcher for matching any given Objective-C selectorGeorge Karpenkov2018-03-291-0/+11
| | | | | | | | Incudes a tiny related refactoring. Differential Revision: https://reviews.llvm.org/D44858 llvm-svn: 328747
* [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle ↵George Karpenkov2018-03-291-2/+58
| | | | | | | | Objective-C methods Differential Revision: https://reviews.llvm.org/D44707 llvm-svn: 328746
* [ASTMatchers] Add isAssignmentOperator matcherPeter Szecsi2018-03-271-0/+26
| | | | | | | | | | | Adding a matcher for BinaryOperator and cxxOperatorCallExpr to be able to decide whether it is any kind of assignment operator or not. This would be useful since allows us to easily detect assignments via matchers for static analysis (Tidy, SA) purposes. Differential Revision: https://reviews.llvm.org/D44893 llvm-svn: 328618
* [ASTMatchers] Remove extra qualifier for consistency ↵Clement Courbet2018-03-211-1/+1
| | | | | | | | (LibASTMatchersReference.html) + Regenerate doc. llvm-svn: 328087
* [ASTMatchers] Regenerate doc.Clement Courbet2018-03-211-3/+3
| | | | llvm-svn: 328086
* [ASTMatcher] Extend hasAnyArgument to ObjCMessageExprGeorge Karpenkov2018-03-071-2/+33
| | | | | | | | | | | | | | | Currently hasArgument works with both ObjC messages and function calls, but not hasAnyArgument. This patch fixes that discrepancy, as it's often more convenient to use hasAnyArgument. On a more general note, it would be great to have a common superclass for objc-call and function call, and a matcher matching that, but that's probably a job for another commit. Differential Revision: https://reviews.llvm.org/D44169 llvm-svn: 326865
* [ASTMatchers] Regenerate documentation after r325678Eric Liu2018-02-211-0/+6
| | | | llvm-svn: 325682
* Add hasTrailingReturn AST matcherJulie Hockett2018-01-221-0/+9
| | | | | | | | Adds AST matcher for a FunctionDecl that has a trailing return type. Differential Revision: https://reviews.llvm.org/D42273 llvm-svn: 323158
* [ASTMatchers] [NFC] Fix code examplesFangrui Song2018-01-221-29/+31
| | | | | | | | Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42213 llvm-svn: 323157
* [ASTMatcher] Add isScoped matcher for enumDecl.Haojian Wu2018-01-181-0/+9
| | | | | | | | | | | | Summary: Reviewers: bkramer, aaron.ballman Subscribers: aaron.ballman, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D42185 llvm-svn: 322826
* [ASTMatchers] Add isNoReturn() match narrower for FunctionDeclarationsRoman Lebedev2018-01-171-0/+14
| | | | | | | | | | | | | | Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: dblaikie, klimek, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D41455 llvm-svn: 322746
* Update dump_ast_matchers for many recent changes.Benjamin Kramer2018-01-171-75/+244
| | | | | | | The html file hasn't been updated in a long time so there are quite a few changes in there. No matchers were removed though. llvm-svn: 322687
* Add the hasDefinition() AST matcher to match class declarations that also ↵Aaron Ballman2017-11-291-0/+9
| | | | | | | | have a definition. Patch by Julie Hockett. llvm-svn: 319360
* [ASTMatchers] Matchers for new[] operatorsAdam Balogh2017-11-231-0/+20
| | | | | | | | Two new matchers for `CXXNewExpr` are added which may be useful e.g. in `clang-tidy` checkers. One of them is `isArray` which matches `new[]` but not plain `new`. The other one, `hasArraySize` matches `new[]` for a given size. llvm-svn: 318909
* Add an AST matcher for hasDefaultArgument() to match on parameter ↵Aaron Ballman2017-11-211-0/+9
| | | | | | | | declarations that have a default value. Patch by Julie Hockett. llvm-svn: 318794
* Make isDefinition matcher support ObjCMethodDeclDave Lee2017-11-141-5/+48
| | | | | | | | | | | | | | | | | Summary: Allow the `isDefinition()` matcher to apply to `ObjCMethodDecl` nodes, in addition to those it already supports. For whatever reason, `ObjCMethodDecl` does not inherit from `FunctionDecl` and so this is specialization is necessary. Reviewers: aaron.ballman, malcolm.parsons, alexshap Reviewed By: aaron.ballman Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D39948 llvm-svn: 318152
* Fix AST matcher documentation typoDave Lee2017-11-111-1/+1
| | | | llvm-svn: 317993
* Add ObjC exception statement AST matchersDave Lee2017-11-111-0/+35
| | | | | | | | | | | | | | Summary: Add AST matchers for Objective-C @throw, @try, @catch and @finally. Reviewers: aaron.ballman, malcolm.parsons, alexshap, compnerd Reviewed By: aaron.ballman Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D39940 llvm-svn: 317992
* Add objcCategoryImplDecl matcherDave Lee2017-10-261-0/+9
| | | | | | | | | | | | | | | | | Summary: Add `objcCategoryImplDecl` which matches ObjC category definitions (`@implementation`). This matcher complements `objcCategoryDecl` (`@interface`) which was added in D30854. Reviewers: aaron.ballman, malcolm.parsons, alexshap Reviewed By: aaron.ballman Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D39293 llvm-svn: 316670
* [clang] Fix isExternC matcher docsAlexander Shaposhnikov2017-09-221-8/+14
| | | | | | | | | | | The wording in the documentation for the matcher isExternC appears to be misleading since this matcher is applicable to functions and variables as well. This diff changes the comment and regenerates the html file. Differential revision: https://reviews.llvm.org/D38151 llvm-svn: 314022
* Add objcImplementationDecl matcherDave Lee2017-09-101-0/+9
| | | | | | | | | | | | | | | | | | | | | Summary: Add the `objcImplementationDecl` matcher. See related: D30854 Tested with: ``` ./tools/clang/unittests/ASTMatchers/ASTMatchersTests ``` Reviewers: aaron.ballman, compnerd, alexshap Reviewed By: aaron.ballman Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D37643 llvm-svn: 312889
* Unify and simplify the behavior of the hasDeclaration matcher.Manuel Klimek2017-08-021-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | Originally, we weren't able to match on Type nodes themselves (only QualType), so the hasDeclaration matcher was initially written to give what we thought are reasonable results for QualType matches. When we chagned the matchers to allow matching on Type nodes, it turned out that the hasDeclaration matcher was by chance written templated enough to now allow hasDeclaration to also match on (some) Type nodes. This patch change the hasDeclaration matcher to: a) work the same on Type and QualType nodes, b) be completely explicit about what nodes we can match instead of just allowing anything with a getDecl() to match, c) explicitly control desugaring only one level in very specific instances. d) adds hasSpecializedTemplate and tagType matchers to allow migrating existing use cases that now need more explicit matchers Note: This patch breaks clang-tools-extra. The corresponding patch there is approved and will land in a subsequent patch. Differential Revision: https://reviews.llvm.org/D27104 llvm-svn: 309809
* [ASTMatchers][NFC] integerLiteral(): Mention negative integers inClement Courbet2017-07-111-0/+32
| | | | | | | | | | | | | | documentation. Trying to match integerLiteral(-1) will silently fail, because an numeric literal is always positive. - Update the documentation to explain how to match negative numeric literals. - Add a unit test. Differential Revision: https://reviews.llvm.org/D35196 llvm-svn: 307663
* [ASTMatchers] Add clang-query support for equals matcherPeter Wu2017-06-081-17/+85
| | | | | | | | | | | | | Summary: This allows the clang-query tool to use matchers like "integerLiteral(equals(32))". For this to work, an overloaded function is added for each possible parameter type. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D33094 llvm-svn: 305022
* Add cxxStdInitializerListExpr AST matcherJakub Kuderski2017-05-051-2/+15
| | | | | | | | | | | | | | | | | Summary: This adds a new ASTMatcher for CXXStdInitializerListExprs that matches C++ initializer list expressions. The primary motivation is to use it to fix [[ https://bugs.llvm.org/show_bug.cgi?id=32896 | PR32896 ]] (review here [[ https://reviews.llvm.org/D32767 | D32767 ]]). Reviewers: alexfh, Prazek, aaron.ballman Reviewed By: alexfh, aaron.ballman Subscribers: malcolm.parsons, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D32810 llvm-svn: 302287
* [ASTMatchers] add typeAliasTemplateDecl matcher.Eric Liu2017-03-281-0/+9
| | | | | | | | | | | | Reviewers: hokein, aaron.ballman Reviewed By: aaron.ballman Subscribers: aaron.ballman, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D28671 llvm-svn: 298912
* Add AST matchers for ObjCProtocolDecl, ObjCCategoryDecl, ObjCMethodDecl, ↵Aaron Ballman2017-03-151-0/+53
| | | | | | | | ObjCIvarDecl, and ObjCPropertyDecl. Patch by Dave Lee. llvm-svn: 297882
* Fix documentation typo.Malcolm Parsons2017-01-201-1/+1
| | | | llvm-svn: 292595
* [ASTMatchers] Add hasInClassInitializer traversal matcher for FieldDecl.Malcolm Parsons2016-12-241-0/+16
| | | | | | | | | | | | | | | Summary: I needed to know whether a FieldDecl had an in-class initializer for D26453. I used a narrowing matcher there, but a traversal matcher might be generally useful. Reviewers: sbenza, bkramer, klimek, aaron.ballman Subscribers: aaron.ballman, Prazek, cfe-commits Differential Revision: https://reviews.llvm.org/D28034 llvm-svn: 290492
* [ASTMatchers] Fix doc for hasBitWidthMalcolm Parsons2016-12-241-2/+3
| | | | llvm-svn: 290491
* [ASTMatcher] Add hasReplacementType matcher for SubstTemplateTypeParmTypeMalcolm Parsons2016-12-081-0/+14
| | | | | | | | | | | | Summary: Needed for https://reviews.llvm.org/D27166 Reviewers: sbenza, bkramer, klimek Subscribers: aemerson, cfe-commits Differential Revision: https://reviews.llvm.org/D27447 llvm-svn: 289042
* Adds hasUnqualifiedDesugaredType to allow matching through type sugar.Manuel Klimek2016-12-011-124/+136
| | | | | | Differential Revision: https://reviews.llvm.org/D27207 llvm-svn: 288366
* [ASTMatchers] Fix a typo in cStyleCastExpr() HTML docs as well. NFC.Artem Dergachev2016-11-111-1/+1
| | | | llvm-svn: 286651
* [ASTMatcher] Add CXXNewExpr support to hasDeclarationMalcolm Parsons2016-10-311-0/+54
| | | | | | | | | | Reviewers: sbenza, lukasza, aaron.ballman, klimek Subscribers: lukasza, sbenza, cfe-commits Differential Revision: https://reviews.llvm.org/D26032 llvm-svn: 285644
* [ASTMatcher] Clarify isStaticStorageClass and hasStaticStorageDuration ↵Haojian Wu2016-09-271-6/+14
| | | | | | | | | | | | documents. Reviewers: aaron.ballman Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D24928 llvm-svn: 282474
* [ASTMatcher] Add isStaticStorageClass matcher for varDecl and functionDecl.Haojian Wu2016-09-261-1/+29
| | | | | | | | | | Reviewers: klimek Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D24821 llvm-svn: 282415
* Fix a typo in the doc: overriden -> overriddenSylvestre Ledru2016-08-281-1/+1
| | | | llvm-svn: 279942
* Correct the documentation for isSignedInteger() and isUnsignedInteger().Aaron Ballman2016-08-181-2/+2
| | | | | | Patch by Visoiu Mistrih Francis llvm-svn: 279055
* Add an AST matcher for external formal linkage.Aaron Ballman2016-08-171-0/+20
| | | | | | Patch by Visoiu Mistrih llvm-svn: 278926
* [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()Martin Bohme2016-08-091-0/+30
| | | | | | | | | | | | Summary: Required for D22220 Reviewers: sbenza, klimek, aaron.ballman, alexfh Subscribers: alexfh, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D23004 llvm-svn: 278123
* Make isExternC work on VarDecls too.Benjamin Kramer2016-08-041-0/+12
| | | | llvm-svn: 277712
* Fix a typo in document.Haojian Wu2016-07-291-6/+6
| | | | llvm-svn: 277174
* [ASTMatcher] Add templateName matcher.Haojian Wu2016-07-291-0/+24
| | | | | | | | | | Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D22963 llvm-svn: 277155
* [ASTMatcher] Add hasTemplateArgument/hasAnyTemplateArgument support in ↵Haojian Wu2016-07-291-8/+78
| | | | | | | | | | | | functionDecl. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D22957 llvm-svn: 277142
* [ASTMatchers] isSignedInteger() and isUnsignedInteger()Clement Courbet2016-07-121-4/+34
| | | | | | | | Complementary to isInteger(), these match signed and unsigned integers respectively. Review: http://reviews.llvm.org/D21989 llvm-svn: 275157
* Add AST matchers for handling bit-fields and narrowing based on their width.Aaron Ballman2016-07-061-1/+28
| | | | llvm-svn: 274652
* [ASTMatchers] New forEachOverriden matcher.Clement Courbet2016-07-051-0/+24
| | | | | | Matches methods overridden by the given method. llvm-svn: 274531
* [ASTMatcher] Add a node matcher for EnumType.Haojian Wu2016-06-301-0/+15
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D21860 llvm-svn: 274217
OpenPOWER on IntegriCloud