summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-query/tool/ClangQuery.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-query] Continue if compilation command not found for some filesGeorge Karpenkov2018-12-051-2/+13
| | | | | | | | | | | | | | | | | When searching for a code pattern in an entire project with a compilation database it's tempting to run ``` clang-query **.cpp ``` And yet, that often breaks because some files are just not in the compilation database: tests, sample code, etc.. clang-query should not stop when encountering such cases. Differential Revision: https://reviews.llvm.org/D51183 llvm-svn: 348328
* Add preload option to clang-queryStephen Kelly2018-08-301-0/+15
| | | | | | | | | | Summary: This allows loading a file with pre-defined let commands for example. Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51261 llvm-svn: 341145
* Extract runCommandsInFile methodStephen Kelly2018-08-301-12/+19
| | | | | | | | Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51260 llvm-svn: 341144
* modernize-use-auto NFC fixesPiotr Padlewski2016-12-141-6/+2
| | | | llvm-svn: 289656
* [clang-query] Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-011-2/+2
| | | | | | | | | | Reviewers: pcc, dblaikie Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26205 llvm-svn: 285731
* Update to match LLVM r272232.Richard Smith2016-06-091-1/+1
| | | | llvm-svn: 272235
* Add the "quit" command as a way to terminate clang-query interactive sessions.Aaron Ballman2015-08-061-0/+2
| | | | llvm-svn: 244206
* Use CommonOptionsParser in clang-query. This fixes its support of the fixedAlexander Kornienko2014-08-021-26/+11
| | | | | | | | | | | | | | compilation database and makes it behave consistently with other clang tools. Reviewers: klimek, pcc Reviewed By: pcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4763 llvm-svn: 214607
* Fix clang-query on Windows: flush llvm::outs() after each command.Manuel Klimek2014-05-211-0/+1
| | | | llvm-svn: 209313
* Blindly try to fix the clang-tools-extra build since my local build doesn't ↵David Blaikie2014-04-251-3/+1
| | | | | | appear to be picking it up llvm-svn: 207230
* Add new 'let' command to bind arbitrary values into constants.Samuel Benzaquen2014-04-231-4/+6
| | | | | | | | | | | | | | 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-3/+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
* Add completion to the query parser, and hook it up to clang-query.Peter Collingbourne2014-02-011-3/+4
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2263 llvm-svn: 200604
* Switch clang-query to use the lineeditor library.Peter Collingbourne2014-02-011-28/+4
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2262 llvm-svn: 200603
* Run llvm/utils/sort_includes.py over the Clang tools code. This doesn'tChandler Carruth2014-01-071-4/+2
| | | | | | | | | | always produce as pretty of results as it does in LLVM and Clang, but I don't mind and the value of having a single canonical ordering is very high IMO. Let me know if you spot really serious problems here. llvm-svn: 198703
* Introduce clang-query tool.Peter Collingbourne2013-11-081-0/+158
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