summaryrefslogtreecommitdiffstats
path: root/clang/lib/ASTMatchers/Dynamic/Registry.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [ASTMatchers] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-11-011-21/+27
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 317137
* Add objcCategoryImplDecl matcherDave Lee2017-10-261-0/+1
| | | | | | | | | | | | | | | | | 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
* [ASTMatchers] Expose forEachOverriden in dynamic AST matchers.Benjamin Kramer2017-10-231-0/+1
| | | | llvm-svn: 316344
* Add objcImplementationDecl matcherDave Lee2017-09-101-0/+1
| | | | | | | | | | | | | | | | | | | | | 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
* Register linkageSpecDecl matcherDave Lee2017-08-311-0/+1
| | | | | | | | | | | | | | | | | Summary: This allows `linkageSpecDecl` to be used from `clang-query`. See also D31869 which similary adds `isStaticStorageClass`. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D37346 llvm-svn: 312283
* [ASTMatchers] Add clang-query support for equals matcherPeter Wu2017-06-081-9/+19
| | | | | | | | | | | | | 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-0/+1
| | | | | | | | | | | | | | | | | 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
* [clang] Register isConstexpr matcherAlexander Shaposhnikov2017-04-161-0/+1
| | | | | | | | | | | | | This diff registers isConstexpr matcher. Test plan: make check-all check that "match varDecl(isConstexpr())" works in clang-query Differential revision: https://reviews.llvm.org/D32112 llvm-svn: 300427
* Add isStaticStorageClass to the dynamic matcher registry so that it can be ↵Aaron Ballman2017-04-151-0/+1
| | | | | | | | used from clang-query. Patch by Dave Lee. llvm-svn: 300400
* [ASTMatchers] add typeAliasTemplateDecl matcher.Eric Liu2017-03-281-0/+1
| | | | | | | | | | | | 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/+5
| | | | | | | | ObjCIvarDecl, and ObjCPropertyDecl. Patch by Dave Lee. llvm-svn: 297882
* [ASTMatchers] Add hasInClassInitializer traversal matcher for FieldDecl.Malcolm Parsons2016-12-241-0/+1
| | | | | | | | | | | | | | | 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
* [ASTMatcher] Add hasReplacementType matcher for SubstTemplateTypeParmTypeMalcolm Parsons2016-12-081-0/+1
| | | | | | | | | | | | 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-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D27207 llvm-svn: 288366
* [AST] Convert Marshallers to use unique_ptr.Justin Lebar2016-10-101-27/+26
| | | | | | | | | | Reviewers: timshen Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D25425 llvm-svn: 283773
* Add an AST matcher for external formal linkage.Aaron Ballman2016-08-171-0/+1
| | | | | | Patch by Visoiu Mistrih llvm-svn: 278926
* [ASTMatchers] Add templateTypeParmDecl() to Registry.cppMartin Bohme2016-08-121-0/+1
| | | | | | | | | | | | | | Summary: This appears to have been forgotten when templateTypeParmDecl() was initially added. Reviewers: alexfh, aaron.ballman Subscribers: aaron.ballman, klimek, aemerson, rengolin, samparker, cfe-commits Differential Revision: https://reviews.llvm.org/D23448 llvm-svn: 278507
* [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()Martin Bohme2016-08-091-0/+2
| | | | | | | | | | | | 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
* [ASTMatcher] Add templateName matcher.Haojian Wu2016-07-291-0/+1
| | | | | | | | | | Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D22963 llvm-svn: 277155
* [ASTMatchers] isSignedInteger() and isUnsignedInteger()Clement Courbet2016-07-121-0/+2
| | | | | | | | 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-0/+2
| | | | llvm-svn: 274652
* [ASTMatcher] Add a node matcher for EnumType.Haojian Wu2016-06-301-0/+1
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D21860 llvm-svn: 274217
* [ASTMatchers] Add isLambda() matcher.Samuel Benzaquen2016-06-281-0/+1
| | | | llvm-svn: 274015
* IgnoringImplicit matcher.Cong Liu2016-06-241-0/+1
| | | | llvm-svn: 273659
* Adding an AST matcher to ignore parenthesis in *types* (rather than ↵Aaron Ballman2016-06-061-0/+1
| | | | | | expressions). This is required for traversing certain types (like function pointer types). llvm-svn: 271927
* [ASTMatcher] Add a node matcher for UnresolvedLookupExpr.Haojian Wu2016-05-181-0/+1
| | | | | | | | | | Reviewers: alexfh, aaron.ballman Subscribers: aaron.ballman, klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D20360 llvm-svn: 269916
* Add the hasDynamicExceptionSpec() AST matcher to match function declarations ↵Aaron Ballman2016-05-161-0/+1
| | | | | | | | that have a dynamic exception specification. Patch by Don Hinton. llvm-svn: 269662
* Add an AST matcher for CastExpr kindEtienne Bergeron2016-05-131-0/+1
| | | | | | | | | | | | | | Summary: This AST matcher will match a given CastExpr kind. It's an narrowing matcher on CastExpr. Reviewers: klimek, alexfh, sbenza, aaron.ballman Subscribers: Prazek, jroelofs, aaron.ballman, klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D19871 llvm-svn: 269460
* [ASTMatchers] New matcher forFunctionGabor Horvath2016-05-041-0/+1
| | | | | | | | | | | | Summary: Matcher proposed in the review of checker misc-assign-operator (name pending). Its goal is to find the direct enclosing function declaration of a statement and run the inner matcher on it. Two version is attached in this patch (thus it will not compile), to be decided which approach to take. The second one always chooses one single parent while the first one does a depth-first search upwards (thus a height-first search) and returns the first positive match of the inner matcher (thus it always returns zero or one matches, not more). Further questions: is it enough to implement it in-place, or ASTMatchersInternals or maybe ASTMatchFinder should be involved? Reviewers: sbenza Subscribers: aaron.ballman, klimek, o.gyorgy, xazax.hun, cfe-commits Differential Revision: http://reviews.llvm.org/D19357 llvm-svn: 268490
* Add typedefNameDecl() and typeAliasDecl() to the AST matchers; improves ↵Aaron Ballman2016-04-141-0/+2
| | | | | | | | hasType() to match on TypedefNameDecl nodes. Patch by Clement Courbet. llvm-svn: 266331
* [ASTMatchers] New matcher hasReturnValue addedAlexander Kornienko2016-03-221-0/+1
| | | | | | | | | | | | | | Summary: A checker (will be uploaded after this patch) needs to check implicit casts. Existing generic matcher "has" ignores implicit casts and parenthesized expressions and no specific matcher for matching return value expression preexisted. The patch adds such a matcher (hasReturnValue). Reviewers: klimek, sbenza Subscribers: xazax.hun, klimek, cfe-commits Patch by Ádám Balogh! Differential Revision: http://reviews.llvm.org/D17986 llvm-svn: 264037
* Adding new AST matchers for: addrLabelExpr, atomicExpr, ↵Aaron Ballman2016-03-091-0/+13
| | | | | | | | binaryConditionalOperator, designatedInitExpr, designatorCountIs, hasSyntacticForm, implicitValueInitExpr, labelDecl, opaqueValueExpr, parenListExpr, predefinedExpr, requiresZeroInitialization, and stmtExpr. Patch by Aleksei Sidorin. llvm-svn: 263027
* [ASTMatchers] Add matcher hasAnyName.Samuel Benzaquen2016-02-221-0/+1
| | | | | | | | | | | | Summary: Add matcher hasAnyName as an optimization over anyOf(hasName(),...) Reviewers: alexfh Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D17163 llvm-svn: 261574
* Add an AST matcher for real floating-point types. e.g., float, double, long ↵Aaron Ballman2016-02-181-0/+1
| | | | | | double, but not complex. llvm-svn: 261221
* Add a nullPointerConstant() AST matcher to handle variations of null pointer ↵Aaron Ballman2016-02-161-0/+1
| | | | | | constants in one matcher. llvm-svn: 261008
* Add isAnyPointer() matchers. Register missing matchers.Felix Berger2016-02-151-0/+2
| | | | | | | | | | | | | Summary: The isAnyPointer() matcher is useful for http://reviews.llvm.org/D15623. Reviewers: alexfh, klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15819 llvm-svn: 260872
* Registering the gnuNullExpr AST matcher as a dynamic matcher so that it is ↵Aaron Ballman2016-02-091-0/+1
| | | | | | available from clang-query. llvm-svn: 260222
* Reapply r259210 with a fix for RegistryTest.cpp.Aaron Ballman2016-02-011-0/+1
| | | | | | Patch by Richard Thomson. llvm-svn: 259359
* Revert r259210 "Extend hasType narrowing matcher for TypedefDecls, add ↵Hans Wennborg2016-01-291-1/+0
| | | | | | | | functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes." It didn't pass check-clang. llvm-svn: 259218
* Extend hasType narrowing matcher for TypedefDecls, add functionProtoType ↵Aaron Ballman2016-01-291-0/+1
| | | | | | | | matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes. Patch by Richard Thomson llvm-svn: 259210
* Add am AST matcher for isMoveAssignmentOperator.Aaron Ballman2016-01-221-0/+1
| | | | | | Patch by Jonathan Coe. llvm-svn: 258573
* Add an isVirtualAsWritten AST matcher.Nico Weber2016-01-211-0/+1
| | | | | | http://reviews.llvm.org/D16394 llvm-svn: 258415
* Register the isCopyAssignmentOperator AST matcher so that it can be used ↵Aaron Ballman2016-01-201-0/+1
| | | | | | | | dynamically. Path by Jonathan Coe. llvm-svn: 258341
* Add AST matcher for paren expressions.Aaron Ballman2016-01-201-0/+1
| | | | | | Patch by Adrian Zgorzałek. llvm-svn: 258321
* Add an AST matcher for checking whether a function is defaulted.Aaron Ballman2016-01-181-0/+1
| | | | | | Patch by Jonathan Coe. llvm-svn: 258072
* Add forEachArgumentWithParam AST matcher.Manuel Klimek2016-01-181-0/+1
| | | | | | | | | | | | The new matcher allows users to provide a matcher for both the argument of a CallExpr/CxxConstructExpr a well as the ParmVarDecl of the argument. Patch by Felix Berger. Differential Revision: http://reviews.llvm.org/D13845 llvm-svn: 258042
* [ASTMatchers] Add booleanType() matcher.Samuel Benzaquen2015-12-221-0/+1
| | | | llvm-svn: 256278
* Add a narrowing AST matcher that matches on a FunctionDecl with a ↵Aaron Ballman2015-12-021-0/+1
| | | | | | non-throwing exception specification. llvm-svn: 254516
* Add an AST matcher for narrowing when a type is volatile-qualified.Aaron Ballman2015-11-231-0/+1
| | | | llvm-svn: 253882
* Re-committing r253473 after hopefully fixing the bot breakage. There was a ↵Aaron Ballman2015-11-181-0/+3
| | | | | | copy-pasta issue that my local testing did not catch. llvm-svn: 253481
OpenPOWER on IntegriCloud