]> granicus.if.org Git - clang/commit
This patch implements an AST matching framework that allows to write
authorManuel Klimek <klimek@google.com>
Tue, 31 May 2011 23:49:32 +0000 (23:49 +0000)
committerManuel Klimek <klimek@google.com>
Tue, 31 May 2011 23:49:32 +0000 (23:49 +0000)
commit64cbdf370984783911bb6d3bc25ec35a8b59e998
treed9f1e5c11584852365aeef877c1f1a36db5548e3
parentd65e091631cc521fcb95a16d6587c0fed8b7164b
This patch implements an AST matching framework that allows to write
tools that match on the C++ ASTs. The main interface is in ASTMatchers.h,
an example implementation of a tool that removes redundant .c_str() calls
is in the example RemoveCStrCalls.cpp.

Various contributions:
Zhanyong Wan, Chandler Carruth, Marcin Kowalczyk, Wei Xu, James Dennett.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132374 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
examples/Tooling/CMakeLists.txt
examples/Tooling/RemoveCStrCalls/CMakeLists.txt [new file with mode: 0644]
examples/Tooling/RemoveCStrCalls/RemoveCStrCalls.cpp [new file with mode: 0644]
examples/Tooling/replace.py [new file with mode: 0755]
include/clang/Tooling/ASTMatchers.h [new file with mode: 0644]
include/clang/Tooling/Tooling.h
include/clang/Tooling/VariadicFunction.h [new file with mode: 0644]
lib/Tooling/ASTMatchers.cpp [new file with mode: 0644]
lib/Tooling/CMakeLists.txt
lib/Tooling/Tooling.cpp
test/Tooling/remove-cstr-calls.cpp [new file with mode: 0644]
unittests/CMakeLists.txt
unittests/Tooling/ASTMatchersTest.cpp [new file with mode: 0644]