summaryrefslogtreecommitdiffstats
path: root/clang/lib/ASTMatchers/Dynamic
Commit message (Collapse)AuthorAgeFilesLines
...
* 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] Add own version of VariadicFunction.Samuel Benzaquen2016-03-251-5/+6
| | | | | | | | | | | | | | | | Summary: llvm::VariadicFunction is only being used by ASTMatchers. Having our own copy here allows us to remove the other one from llvm/ADT. Also, we can extend the API to meet our needs without modifying the common implementation. Reviewers: alexfh Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D18275 llvm-svn: 264417
* [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
* Pass /bigobj when building lib/ASTMatchers/Dynamic/Registry.cppReid Kleckner2016-02-091-0/+9
| | | | | | | | | This is the third time it has crossed the 2^16 section limit. We've already spent time optimizing this file to reduce template instantiations, and it's not clear that there is anymore low hanging fruit. llvm-svn: 260267
* 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
* Remove autoconf supportChris Bieneman2016-01-261-13/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 llvm-svn: 258862
* Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes.Eugene Zelenko2016-01-261-9/+7
| | | | | | Differential revision: http://reviews.llvm.org/D16567 llvm-svn: 258836
* 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
* Reverting r253473 while I investigate build bot failures.Aaron Ballman2015-11-181-3/+0
| | | | llvm-svn: 253475
* Adding AST matchers for VarDecl storage durations. Can now determine whether ↵Aaron Ballman2015-11-181-0/+3
| | | | | | a VarDecl has automatic, static, or thread storage duration. This also updates the documentation for matchers, which appear to be missing some previous additions. llvm-svn: 253473
* Roll-back r250822.Angel Garcia Gomez2015-10-203-6/+6
| | | | | | | | | | Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 llvm-svn: 250827
* Apply modernize-use-default to clang.Angel Garcia Gomez2015-10-203-6/+6
| | | | | | | | | | | | Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 llvm-svn: 250822
* Add decayedType and hasDecayedType AST matchersMatthias Gehre2015-10-121-0/+2
| | | | | | | | | | | | Summary: Add decayedType and hasDecayedType AST matchers Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13639 llvm-svn: 250114
* Adding a narrowing AST matcher for FunctionDecl::isVariadic(), plus tests ↵Aaron Ballman2015-10-051-0/+1
| | | | | | and documentation. llvm-svn: 249321
* SourceRanges are small and trivially copyable, don't them by reference.Craig Topper2015-10-044-18/+18
| | | | llvm-svn: 249259
* Rename AST node matchers to match the AST node names directly. Part of this ↵Aaron Ballman2015-09-171-27/+31
| | | | | | rename also splits recordDecl() (which used to match CXXRecordDecl) into recordDecl() (that matches RecordDecl) and cxxRecordDecl (that matches CXXRecordDecl). Also adds isStruct(), isUnion(), and isClass() narrowing matchers for RecordDecl objects. llvm-svn: 247885
* Fixed HasDeclarationMatcher to properly convert all types into decls where ↵Aaron Ballman2015-09-111-0/+5
| | | | | | | | | | | | | | possible. Added objcObjectPointerType(), objcInterfaceDecl(), templateTypeParmType(), injectedClassNameType(), and unresolvedUsingTypenameDecl(). Updated documentation for pointerType() to call out that it does not match ObjCObjectPointerType types. Changed pointsTo() to handle ObjCObjectPointerType as well as PointerType. While this may seem like a lot of unrelated changes, they all relate back to fixing HasDeclarationMatcher. This now allows us to write a matcher like: varDecl(hasType(namedDecl(hasName("Foo")))) that matches code using typedefs, objc interfaces, template type parameters, injected class names, or unresolved using typenames. llvm-svn: 247404
* Adding an AST matcher for namespaceAliasDecl.Aaron Ballman2015-08-281-0/+1
| | | | llvm-svn: 246322
* [ASTMatchers] Add type matcher for SubstTemplateTypeParmType.Samuel Benzaquen2015-08-261-0/+1
| | | | llvm-svn: 246037
* Add AST narrowing matchers for inline and anonymous namespaces. Since the ↵Aaron Ballman2015-08-181-0/+2
| | | | | | inline keyword can also be specified on a FunctionDecl, this is a polymorphic matcher. llvm-svn: 245337
* Switching from an explicit loop to DeleteContainerSeconds; NFC.Aaron Ballman2015-08-121-2/+2
| | | | llvm-svn: 244802
* RangRangify some more for loops; NFC.Aaron Ballman2015-08-121-17/+15
| | | | llvm-svn: 244792
* Add a polymorphic AST matcher for testing whether a constructor or a ↵Aaron Ballman2015-08-111-0/+1
| | | | | | conversion declaration is marked as explicit or not. llvm-svn: 244666
* Add an AST matcher to match member intializers of a CXXCtorInitializer.Aaron Ballman2015-08-111-0/+1
| | | | llvm-svn: 244662
* Add AST matchers for narrowing constructors that are default, copy, or move ↵Aaron Ballman2015-08-051-0/+4
| | | | | | constructors, as well as functionality to determine whether a ctor initializer is a base initializer. llvm-svn: 244036
* Add an AST matcher, isFinal(), for testing whether a method or class ↵Aaron Ballman2015-07-241-0/+1
| | | | | | declaration are marked final. llvm-svn: 243107
* [ASTMatchers] Use provided target NodeKind instead of inferring it from the ↵Samuel Benzaquen2015-07-171-1/+1
| | | | | | | | | | matchers. Individual matchers might not be convertible to each other's kind, but they might still all be convertible to the target kind. All the callers already know the target kind, so just pass it down. llvm-svn: 242534
* Add the ability to AST match a variable declaration that is an exception ↵Aaron Ballman2015-07-151-0/+1
| | | | | | variable. llvm-svn: 242303
* Replace some const std::string & with llvm::StringRef or std::stringYaron Keren2015-07-062-3/+3
| | | | | | | | and std::move to avoid implicit std::string construction. Patch by Eugene Kosov. llvm-svn: 241433
* Revert r241330. It compiled with Visual C++ 2013 and gcc 4.9.1 (mingw) but ↵Yaron Keren2015-07-032-3/+3
| | | | | | now fails the bots. llvm-svn: 241335
* Replace some const std::string & with llvm::StringRef or std::stringYaron Keren2015-07-032-3/+3
| | | | | | | | and std::move to avoid implicit std::string construction. Patch by Eugene Kosov. llvm-svn: 241330
* Revert r241319, investigating.Yaron Keren2015-07-032-3/+3
| | | | llvm-svn: 241321
* Replace some const std::string & with llvm::StringRef or std::stringYaron Keren2015-07-032-3/+3
| | | | | | | | | | and std::move to avoid implicit std::string construction. Part 1/2. Patch by Eugene Kosov. llvm-svn: 241319
OpenPOWER on IntegriCloud