Craig Topper
2f3476c25e
Remove call to llvm::makeArrayRef. Implicit conversion is sufficient.
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@216711 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-29 06:05:20 +00:00
Craig Topper
8deb1ac5d1
Simplify creation of a couple ArrayRefs by using None and makeArrayRef.
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@216529 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-27 06:29:07 +00:00
Samuel Benzaquen
caf496a4ee
[clang-query] Use the new API for named values from the Parser.
...
Summary: This finishes the support for autocomplete for user defined values..
Reviewers: pcc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4851
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215474 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-12 21:22:58 +00:00
Alexander Kornienko
23af33b85d
Use CommonOptionsParser in clang-query. This fixes its support of the fixed
...
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
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214607 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-02 01:02:33 +00:00
Alp Toker
dfd9ace057
Track clang r213171
...
The clang rewriter is now a core facility.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@213172 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-16 16:50:17 +00:00
NAKAMURA Takumi
5a1fb366a9
Prune Redundant libdeps in CMake's target_link_libraries and LLVMBuild.txt.
...
I checked this with Release+Asserts on x86_64-mingw32. Please restore partially if this were overkill.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@213064 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-15 11:37:03 +00:00
NAKAMURA Takumi
479bfce77e
[CMake] Update libdeps.
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@212920 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-14 05:01:53 +00:00
Craig Topper
6b81175aaa
Simplify code. No functional change.
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@210508 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-10 04:50:50 +00:00
Craig Topper
0913826cdd
[C++11] Use 'nullptr'.
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@210447 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-09 02:03:06 +00:00
Manuel Klimek
746f28ca9e
Fix clang-query on Windows: flush llvm::outs() after each command.
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@209313 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-21 18:10:47 +00:00
David Blaikie
055682d478
Slightly less blindly fixing clang-tools-extra now that I remember that the "check-clang" target doesn't check clang-tools-extra
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@207231 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-25 15:21:43 +00:00
David Blaikie
a450a7dcb1
Blindly try to fix the clang-tools-extra build since my local build doesn't appear to be picking it up
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@207230 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-25 15:06:18 +00:00
NAKAMURA Takumi
6b67ba6ead
QueryParser::doParse(): Fix msc17 build. Don't use initializer list.
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@206998 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-23 16:01:44 +00:00
Samuel Benzaquen
045c15ba71
Add new 'let' command to bind arbitrary values into constants.
...
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
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@206984 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-23 14:04:52 +00:00
Ahmed Charles
c1d88b9502
[C++11] Replace OwningPtr with std::unique_ptr.
...
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.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@203382 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-09 09:24:40 +00:00
Chandler Carruth
bcec455e1f
[cleanup] Re-sort headers with llvm/utils/sort_includes.py.
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@202809 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 10:03:05 +00:00
Dmitri Gribenko
76e47bcd14
Documentation comments: fix incorrect usage of \param
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@202649 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-02 16:48:59 +00:00
Craig Topper
2bbd7e03d1
[C++11] Replace LLVM_OVERRIDE with 'override'
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@202632 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-02 10:20:11 +00:00
NAKAMURA Takumi
61727cdab2
[CMake] Use LINK_LIBS instead of target_link_libraries().
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@202238 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26 06:41:29 +00:00
Peter Collingbourne
da776c0cf2
Add a makefile for clang-query. Patch by Alex Horn!
...
While at it, have cmake build and test the tool if libedit is not installed,
as this dependency is now optional.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@201599 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18 19:46:01 +00:00
Peter Collingbourne
e4cc48cfdf
Add completion to the query parser, and hook it up to clang-query.
...
Differential Revision: http://llvm-reviews.chandlerc.com/D2263
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@200604 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-01 01:42:46 +00:00
Peter Collingbourne
f88a2f75ab
Switch clang-query to use the lineeditor library.
...
Differential Revision: http://llvm-reviews.chandlerc.com/D2262
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@200603 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-01 01:42:42 +00:00
Chandler Carruth
826024a6b1
Run llvm/utils/sort_includes.py over the Clang tools code. This doesn't
...
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.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@198703 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-07 20:05:01 +00:00
NAKAMURA Takumi
e50d2fe35e
[CMake] clang-tools-extra: Update dependencies.
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@196860 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-10 01:41:10 +00:00
Peter Collingbourne
961d563eab
Revert r194247 conditional on non-MSVC.
...
These definitions are required by the standard. MSVC rejecting them
appears to be a bug.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@194252 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-08 08:54:53 +00:00
NAKAMURA Takumi
cdeab62ef6
clang-query: Unbreak msvc.
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@194247 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-08 06:29:09 +00:00
Peter Collingbourne
1ba478616c
Silence GCC warning.
...
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@194230 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-08 01:08:12 +00:00
Peter Collingbourne
26c59a1880
Introduce clang-query tool.
...
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
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@194227 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-08 00:08:23 +00:00