[cfe-commits] r132374 - in /cfe/trunk: examples/Tooling/ examples/Tooling/RemoveCStrCalls/ include/clang/Tooling/ lib/Tooling/ test/Tooling/ unittests/ unittests/Tooling/

Chris Lattner clattner at apple.com
Wed Jun 1 21:28:55 PDT 2011


On May 31, 2011, at 4:49 PM, Manuel Klimek wrote:

> Author: klimek
> Date: Tue May 31 18:49:32 2011
> New Revision: 132374
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=132374&view=rev
> Log:
> 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.

Hi Manuel (and company),

I'm really behind on code review, so maybe this was already discussed... but why does it make sense to take this into clang mainline?

I thought we previously discussed that enabling people to do pattern matching on ast's by *REBUILDING THE COMPILER* is not a particularly interesting thing to do, and there are ways to do it already with the libclang API.

What problem is this solving and why should it be in mainline?

-Chris




More information about the cfe-commits mailing list