summaryrefslogtreecommitdiffstats
path: root/clang/docs/tools/dump_ast_matchers.py
Commit message (Collapse)AuthorAgeFilesLines
* Portable Python script across Python versionSerge Guelton2018-12-191-2/+5
| | | | | | | | | urllib2 as been renamed into urllib and the library layout has changed. Workaround that in a consistent manner. Differential Revision: https://reviews.llvm.org/D55199 llvm-svn: 349627
* Portable Python script across Python versionSerge Guelton2018-12-181-4/+4
| | | | | | | | Using from __future__ import print_function it is possible to have a compatible behavior of `print(...)` across Python version. Differential Revision: https://reviews.llvm.org/D55213 llvm-svn: 349454
* Stop stripping comments from AST matcher example code.Aaron Ballman2018-12-111-1/+1
| | | | | | The AST matcher documentation dumping script was being a bit over-zealous about stripping comment markers, which ended up causing comments in example code to stop being comments. Fix that by only stripping comments at the start of a line, rather than removing any forward slash (which also impacts prose text). llvm-svn: 348891
* Update our URLs in clang doc to use httpsSylvestre Ledru2018-11-041-1/+1
| | | | llvm-svn: 346101
* Remove non-existant typeloc matchers from documentationStephen Kelly2018-10-091-3/+3
| | | | llvm-svn: 344023
* [ASTMatchers] Support generating docs for single-line matchersBenjamin Kramer2018-01-171-1/+1
| | | | | | clang-format likes this format. PR35989. llvm-svn: 322783
* Update dump_ast_matchers for many recent changes.Benjamin Kramer2018-01-171-13/+14
| | | | | | | 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
* IgnoringImplicit matcher.Cong Liu2016-06-241-0/+0
| | | | llvm-svn: 273659
* Fix the doc extraction script to work with hasAnyName and with equalsNode.Samuel Benzaquen2016-05-041-3/+3
| | | | | | | | | The change from llvm::VariadicFunction to internal::VariadicFunction broke the extraction of hasAnyName(). equalsNode was broken because the argument type is 'const XXXX*' and the internal space caused a failure on the regex. llvm-svn: 268548
* [ASTMatchers] Add matcher hasAnyName.Samuel Benzaquen2016-02-221-0/+10
| | | | | | | | | | | | 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
* [analyzer] dump_ast_matchers.py: fix replacement regexpsYury Gribov2016-02-181-3/+3
| | | | | | | | Patch by Alex Sidorin! Differential Revision: http://reviews.llvm.org/D17376 llvm-svn: 261219
* Properly encode the < entity; it was missing the semicolon. Regenerating ↵Aaron Ballman2016-01-221-1/+1
| | | | | | the AST matcher reference after fixing the issue. Thanks to Richard for noticing the issue and bringing it to my attention! llvm-svn: 258579
* When dumping documentation for AST matchers, do something more useful with ↵Aaron Ballman2016-01-211-0/+5
| | | | | | | | \see doxygen commands. Ideally this would link to the target of \see, but for now it translates \see into "See also: " Regenerate the AST documentation for this new functionality. llvm-svn: 258401
* Fix ASTMatcher reference newlines and make the generator script windows-proof.Benjamin Kramer2015-11-201-1/+1
| | | | llvm-svn: 253653
* Fix AST matcher documentation.Manuel Klimek2015-08-141-3/+3
| | | | | | | | | | | Fix a bug in the matcher docs where callExpr(on(...)) was in the examples, but didn't work (on() only works for memberCallExpr). Fix a bug in the doc dump script that was introduced in r231575 when removing a regexp capture without adapting the code that uses the captures. llvm-svn: 245040
* ASTMatchers: Make AST_POLYMORPHIC_SUPPORTED_TYPES a variadic macroBenjamin Kramer2015-03-071-2/+2
| | | | | | C++11 finally allows us to use this C99 feature. llvm-svn: 231575
* Add loc() to the dynamic registry.Samuel Benzaquen2014-03-101-0/+19
| | | | | | | | | | | | | | | | | | Summary: Add loc() to the dynamic registry. Other fixes: - Fix the polymorphic variant value to accept an exact match, even if there are other possible conversions. - Fix specifiesTypeLoc() to not crash on an empty NestedNameSpecifierLoc. Reviewers: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2928 llvm-svn: 203467
* Fix AST matcher documentation for overloaded matchers.Manuel Klimek2014-02-241-2/+2
| | | | | | | | Before this patch we would only use the fist occurance of a matcher function in the documentation, for example leaving out hasType(Matcher<QualType>). llvm-svn: 202019
* Fix docs generation for the AST matchers:Manuel Klimek2014-02-241-4/+9
| | | | | | | | | 1. Move internal functions into ASTMatchersInternal. 2. Adapt dump_ast_matchers.py to the new VariadicOperatorMatcherFunc signature. 3. Update the actual docs with the updated tool / code. llvm-svn: 202017
* Add partial support for the hasDeclaration() matcher in the dynamic layer.Samuel Benzaquen2013-11-181-1/+2
| | | | | | | | | | | | | | Summary: Add partial support for the hasDeclaration() matcher in the dynamic layer. This matcher has some special logic to allow any type that has a getDecl() method. We do not support this right now. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1889 llvm-svn: 195013
* Rewrite eachOf/allOf/anyOf to use a variadic operator.Samuel Benzaquen2013-08-271-1/+10
| | | | | | | | | | | | | | Summary: Rewrite eachOf/allOf/anyOf to use a variadic operator, instead of hand-written calls to Polymorphic matchers. This simplifies their definition and future changes to add them to the dynamic registry. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1427 llvm-svn: 189357
* Refactor ArgumentAdaptativeMatcher matchers to remove the template from ↵Samuel Benzaquen2013-08-161-0/+10
| | | | | | | | | | | | | | | | their declaration. Summary: Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration. This facilitates dynamic registration. Change the registry code to use the regular overload resolution mechanism for adaptative matchers. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1402 llvm-svn: 188560
* Fix incorrect documentation generation for type matchers.Manuel Klimek2013-07-251-2/+4
| | | | llvm-svn: 187104
* Add support for type traversal matchers.Samuel Benzaquen2013-07-151-6/+9
| | | | | | | | | | | | | | | Summary: Fixup the type traversal macros/matchers to specify the supported types. Make the marshallers a little more generic to support any variadic function. Update the doc script. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1023 llvm-svn: 186340
* Add support for polymorphic matchers. Use runtime type checking to determine ↵Samuel Benzaquen2013-06-211-3/+27
| | | | | | the right polymorphic overload to use. llvm-svn: 184558
* Cleanup of ASTMatcher macros and adding support for overloaded matchers.Manuel Klimek2013-02-061-1/+2
| | | | | | | | | | This is in preparation for adding other overloaded matchers. This change alone is a net win in LOC. I went through all matchers and looked whether we could now encode them as macro, or simplify them with the matcher atoms that were not available before. llvm-svn: 174540
* Fixes dump_ast_matchers to parse all matcher macros and updates theManuel Klimek2013-01-091-5/+36
| | | | | | docs. llvm-svn: 171962
* Introduces anchors into LibASTMatchersReference.html.Manuel Klimek2012-09-071-1/+1
| | | | | | | | This allows linking to LibASTMatchersRefernce.html#<matcher><N>Anchor to link to the N'the declaration of a matcher and automatically expand its documentation. llvm-svn: 163386
* This is a temporary solution until we have a better way toManuel Klimek2012-08-271-0/+264
parse doxygen comments for macros with libclang. I'm not entirely happy about this script, but as it saves a lot of work in keeping the docs up to date with the actual code I think checking it in makes sense. llvm-svn: 162690
OpenPOWER on IntegriCloud