[PATCH] D38171: Implement clang-tidy check aliases.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 10 04:35:40 PDT 2017


xazax.hun added a comment.

Let's also summarize what do we have now and what do we want.

> I also think this sounds good, though I'm not quite sure it can be done in this patch. Anyway, we should definitely specify what we expect from first-class citizen checks. Please correct & extend the list:
> 
> - can be enabled or disabled through a unique name

This is addressed by the current pathc.

> - can have config options

Do you know warnings that have config options? Does this make sense for this featre?

> - can have aliases

Does that make sense to be able to add aliases to warning aliases? I

> - inherits ClangTidyCheck

I think this is just technical and this does not really affect the users.

In https://reviews.llvm.org/D38171#878808, @alexfh wrote:

> 1. Make `clang-diagnostic-*` checks first-class citizens and take full control of all diagnostics, i.e. disable all Clang diagnostics by default, and enable the ones that correspond to the enabled clang-diagnostic checks.


I think this might be a good idea in general. @leanil could you address this point in this patch?

> 2. Make aliases first-class citizens (there was a proposal as well, but we didn't arrive to a consensus at that time). That would include the ability to configure an alias name for any check including clang-diagnostic- and clang-analyzer- checks.

I am not sure that this makes sense, see my points above.

> 3. Use aliases to map clang-diagnostic- checks to check names under cert-, hicpp-, etc.

I agree.


https://reviews.llvm.org/D38171





More information about the cfe-commits mailing list