[cfe-dev] Proposing clang-tidy checks for libc++ internal development
Aaron Ballman via cfe-dev
cfe-dev at lists.llvm.org
Tue Jul 10 05:57:52 PDT 2018
On Mon, Jul 9, 2018 at 11:00 PM, Eric Fiselier via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> Hi All,
> I've been sitting on my own set of clang-tidy checks specific for libc++.
> They are intended for developers of libc++, not users of it, and having them
> can be quite helpful. They include:
> * A reserved name check.
> * Attribute not on declaration check + fix.
> * Externally instantiated function is missing inline check + fix.
> * Externally instantiated function with missing or incorrect visibility
> attributes check + fix.
> As more developers begin to work on libc++, it's useful for these checks to
> be available to all of them.
> I'm looking to find a way to upstream these checks. My question is:
> 1. Are these even appropriate to upstream?
> 2. If so, where should we put them?
> The simple answer is to add a new `libcxx-internal` module to clang-tidy.
> The obvious problem is that clang-tidy ships to all users, and to them this
> module and its checks are just noise.
> What do you think?
I think there's already precedent for adding this sort of thing to
clang-tidy. For instance, we have the LLVM module which is largely
only useful to people working on the LLVM code base. I see no problem
with adding a module for libc++ developers as well. My preference
would be to name the new module "libcxx-module" and prefix the checks
> PS. The non-complete and messy versions of the current checks can be found
> here. I obviously plan to clean them up before submitting for review
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
More information about the cfe-dev