Yes, std::function is a fairly inefficient class. It's useful for
storing a lambda but not so much for passing it around. You can pass
around lambdas as a template argument (requires all callees to be
templates) or as a function pointer if there are no captures. If you
have captures a helper class
Copying function_ref will work, it's independent of the rest of LLVM
and works with all C++11 compilers. I also expect common C++ libraries
to have an equivalent class, but I haven't checked.
On Tue, Oct 25, 2016 at 3:33 AM, Jens Alfke wrote:
>
> On Oct 24, 2016, at 12:00 PM, Benjamin Kramer wro
I don't think I ever added the build rules to build clang-tidy as a
plugin for use outside of libclang. You can use it via libclang and
the python bindings currently. Adding the necessary build rules isn't
easy because you'd have to avoid linking clang symbols into both the
plugin and the actual cl
Using ASTMatchers in a plugin should work as long as clang doesn't use
them. The problems arise when both the plugin and clang define the
same symbols. But with the current cmake build it's not possible to
just link ASTMatchers, it will drag all dependencies of ASTMatchers
along and cause linker er