summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests/clang-query
Commit message (Collapse)AuthorAgeFilesLines
* Fix formatting in previous commitsStephen Kelly2019-12-291-6/+10
|
* Fix use of named values surrounded by newlines in clang-queryStephen Kelly2019-12-291-0/+19
|
* Fix newline handling in clang-query parserStephen Kelly2019-12-291-0/+8
| | | | Don't prematurely remove characters from the end of the string
* Fix handling of newlines in clang-queryStephen Kelly2019-12-291-0/+18
| | | | Replace assert with diagnostic for missing newline.
* Allow newlines in AST Matchers in clang-query filesStephen Kelly2019-12-271-0/+101
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71842
* Revert "Allow newlines in AST Matchers in clang-query files" + 1Evgenii Stepanov2019-12-261-101/+0
| | | | | | | | | Revert "Fix -Wunused-lambda-capture warnings." This reverts commit 2369560f4a7720b19edfbf9de14ef061307ff773. This reverts commit 522ee29a4fb3814db604b585c8637247477ec057. clang/lib/ASTMatchers/Dynamic/Parser.cpp:610:13: warning: implicit conversion turns string literal into bool: 'const char [35]' to 'bool' [-Wstring-conversion] assert(!"Newline should never be found here");
* Allow newlines in AST Matchers in clang-query filesStephen Kelly2019-12-261-0/+101
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71842
* Revert "Allow newlines in AST Matchers in clang-query files"Stephen Kelly2019-12-261-101/+0
| | | | This reverts commit 6a3ecf4dc7ec299394e71b3124df2b3a34ed4ac3.
* Allow newlines in AST Matchers in clang-query filesStephen Kelly2019-12-261-0/+101
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71842
* [clang-tools-extra] [cmake] Link against libclang-cpp whenever possibleMichal Gorny2019-10-041-2/+5
| | | | | | | | | Use clang_target_link_libraries() in order to support linking against libclang-cpp instead of static libraries. Differential Revision: https://reviews.llvm.org/D68448 llvm-svn: 373786
* Fix file headers. NFCFangrui Song2019-03-011-1/+1
| | | | llvm-svn: 355188
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-192-8/+6
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Add explicit dependency on clangSerialization after rC348911Fangrui Song2018-12-121-0/+1
| | | | llvm-svn: 348916
* [clang-query] Add non-exclusive output APIStephen Kelly2018-10-292-3/+49
| | | | | | | | | | | | | | | | | | | | Summary: Add granular options for AST dumping, text printing and diagnostics. This makes it possible to * Have both diag and dump active at once * Extend the output with other queryable content in the future. Reviewers: aaron.ballman, pcc, ioeric, ilya-biryukov, klimek, sammccall Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52857 llvm-svn: 345522
* [clang-query] Refactor Output settings to booleansStephen Kelly2018-10-242-8/+6
| | | | | | | | | | | | Summary: This will make it possible to add non-exclusive mode output. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D53501 llvm-svn: 345194
* [clang-query] Add 'detailed-ast' output as an alias for 'dump'Stephen Kelly2018-10-242-4/+10
| | | | | | | | | | | | Summary: Future development can then dump other content than AST. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D53500 llvm-svn: 345193
* [clang-query] Add option to print matcher expressionStephen Kelly2018-10-201-6/+8
| | | | | | | | | | | | | | Summary: This is useful if using clang-query -f with a file containing multiple matchers. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52859 llvm-svn: 344840
* [clang-query] Add comment token handlingStephen Kelly2018-10-031-0/+11
| | | | | | | | | | | | | | | | | Summary: It is possible to pass a file of commands to clang-query using the command line option -f or --preload. Make it possible to write comments in such files. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D52752 llvm-svn: 343666
* [clang-query] Add single-letter 'q' alias for 'quit'Stephen Kelly2018-10-031-0/+3
| | | | | | | | | | | | Reviewers: aaron.ballman, pcc Reviewed By: aaron.ballman Subscribers: Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D52746 llvm-svn: 343664
* Sort expected test output after previous commitStephen Kelly2018-10-011-6/+6
| | | | llvm-svn: 343538
* [clang-query] Test non-code-completion on single letter shortcutsStephen Kelly2018-10-011-0/+10
| | | | llvm-svn: 343536
* [clang-query] Add missing quit testStephen Kelly2018-10-011-0/+9
| | | | llvm-svn: 343535
* [clang-query] Add missing 'l' command handlingStephen Kelly2018-10-011-0/+6
| | | | | | | | | | | | The `let` command was added in commit 045c15ba (Add new 'let' command to bind arbitrary values into constants., 2014-04-23). The `let` command and the non-existant `l` command were documented in commit 233092a0 (Add 'let' to the help message., 2015-02-27). Implement the `l` command now for completeness. llvm-svn: 343533
* Fix build failure caused by D52157Shuai Wang2018-09-171-1/+1
| | | | llvm-svn: 342408
* [CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai2017-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 llvm-svn: 319840
* Remove autoconf supportChris Bieneman2016-01-261-24/+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 "Now I am become Death, the destroyer of worlds." -J. Robert Oppenheimer Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D16475 llvm-svn: 258864
* Correcting and adding tests for r244206.Aaron Ballman2015-08-061-1/+3
| | | | llvm-svn: 244208
* Add missing dependency clangFrontend to unit test.Adrian Prantl2015-06-201-0/+1
| | | | llvm-svn: 240226
* Add clangBasic to libdeps according to r232051 since the interface of ↵NAKAMURA Takumi2015-03-131-0/+1
| | | | | | ASTMatchers was changed. llvm-svn: 232138
* Revert "Adapt clang-tools-extra to clang module format changes."Adrian Prantl2015-02-251-3/+2
| | | | | | This reverts commit 230424. llvm-svn: 230456
* Adapt clang-tools-extra to clang module format changes.Adrian Prantl2015-02-251-2/+3
| | | | | | | - add clangCodeGen.a to the tools that need it - tweak pp-trace command line handling to not conflict with clang's. llvm-svn: 230424
* Revert "Adapt Makefile dependencies for the clang module format change in ↵Adrian Prantl2015-02-211-3/+3
| | | | | | r230089." llvm-svn: 230104
* Adapt Makefile dependencies for the clang module format change in r230089.Adrian Prantl2015-02-201-3/+3
| | | | llvm-svn: 230090
* [CMake] Update libdeps.NAKAMURA Takumi2014-07-141-0/+1
| | | | llvm-svn: 212920
* Remove unnecessary explicit unique_ptr ctors now that buildASTFromCode ↵David Blaikie2014-04-251-4/+4
| | | | | | returns a unique_ptr instead of a raw pointer. llvm-svn: 207238
* Slightly less blindly fixing clang-tools-extra now that I remember that the ↵David Blaikie2014-04-252-14/+13
| | | | | | "check-clang" target doesn't check clang-tools-extra llvm-svn: 207231
* QueryEngineTest.cpp: Appease g++47.NAKAMURA Takumi2014-04-241-1/+1
| | | | llvm-svn: 207097
* ClangQueryTests: Fix msc17 build. Non-static member initializers are ↵NAKAMURA Takumi2014-04-242-11/+20
| | | | | | unavailable. llvm-svn: 207096
* Add new 'let' command to bind arbitrary values into constants.Samuel Benzaquen2014-04-232-40/+112
| | | | | | | | | | | | | | Summary: Add new 'let' command to bind arbitrary values into constants. These constants can then be used in the matcher expressions. Reviewers: pcc CC: cfe-commits Differential Revision: http://reviews.llvm.org/D3383 llvm-svn: 206984
* [C++11] Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-091-2/+2
| | | | | | | | This removes all references to OwningPtr, which should be fairly undisruptive to out-of-tree projects since they are unlikely to use clang-tools-extra as a library instead of a set of tools. llvm-svn: 203382
* [cleanup] Re-sort headers with llvm/utils/sort_includes.py.Chandler Carruth2014-03-041-1/+1
| | | | llvm-svn: 202809
* Add completion to the query parser, and hook it up to clang-query.Peter Collingbourne2014-02-011-16/+41
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2263 llvm-svn: 200604
* [CMake] clang-tools-extra: Update dependencies.NAKAMURA Takumi2013-12-101-0/+1
| | | | llvm-svn: 196860
* Introduce clang-query tool.Peter Collingbourne2013-11-084-0/+239
This tool is for interactive exploration of the Clang AST using AST matchers. It currently allows the user to enter a matcher at an interactive prompt and view the resulting bindings as diagnostics, AST pretty prints or AST dumps. Example session: $ cat foo.c void foo(void) {} $ clang-query foo.c -- clang-query> match functionDecl() Match #1: foo.c:1:1: note: "root" binds here void foo(void) {} ^~~~~~~~~~~~~~~~~ 1 match. Differential Revision: http://llvm-reviews.chandlerc.com/D2098 llvm-svn: 194227
OpenPOWER on IntegriCloud