Commit Graph

66 Commits

Author SHA1 Message Date
NAKAMURA Takumi fcb3fa13c4 QueryParser::doParse(): Fix msc17 build. Don't use initializer list.
llvm-svn: 206998
2014-04-23 16:01:44 +00:00
Samuel Benzaquen 1f6066c9ac 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

llvm-svn: 206984
2014-04-23 14:04:52 +00:00
Ahmed Charles 6a2dc5c381 [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.

llvm-svn: 203382
2014-03-09 09:24:40 +00:00
Chandler Carruth edc9e38810 [cleanup] Re-sort headers with llvm/utils/sort_includes.py.
llvm-svn: 202809
2014-03-04 10:03:05 +00:00
Dmitri Gribenko 23077e3e0a Documentation comments: fix incorrect usage of \param
llvm-svn: 202649
2014-03-02 16:48:59 +00:00
Craig Topper a3dbe84166 [C++11] Replace LLVM_OVERRIDE with 'override'
llvm-svn: 202632
2014-03-02 10:20:11 +00:00
NAKAMURA Takumi 9698686505 [CMake] Use LINK_LIBS instead of target_link_libraries().
llvm-svn: 202238
2014-02-26 06:41:29 +00:00
Peter Collingbourne b549019c3c 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.

llvm-svn: 201599
2014-02-18 19:46:01 +00:00
Peter Collingbourne d9a0f254bc Add completion to the query parser, and hook it up to clang-query.
Differential Revision: http://llvm-reviews.chandlerc.com/D2263

llvm-svn: 200604
2014-02-01 01:42:46 +00:00
Peter Collingbourne c31176da02 Switch clang-query to use the lineeditor library.
Differential Revision: http://llvm-reviews.chandlerc.com/D2262

llvm-svn: 200603
2014-02-01 01:42:42 +00:00
Chandler Carruth 85e6e87171 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.

llvm-svn: 198703
2014-01-07 20:05:01 +00:00
NAKAMURA Takumi 78f534d689 [CMake] clang-tools-extra: Update dependencies.
llvm-svn: 196860
2013-12-10 01:41:10 +00:00
Peter Collingbourne c7ae6101a4 Revert r194247 conditional on non-MSVC.
These definitions are required by the standard.  MSVC rejecting them
appears to be a bug.

llvm-svn: 194252
2013-11-08 08:54:53 +00:00
NAKAMURA Takumi 55380c4e54 clang-query: Unbreak msvc.
llvm-svn: 194247
2013-11-08 06:29:09 +00:00
Peter Collingbourne 0dc0e6d32c Silence GCC warning.
llvm-svn: 194230
2013-11-08 01:08:12 +00:00
Peter Collingbourne 8b1265b353 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

llvm-svn: 194227
2013-11-08 00:08:23 +00:00