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

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 25 06:03:30 PDT 2017


xazax.hun added a comment.

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

> András, that's definitely an interesting idea. However, it might be interesting to explore a more principled approach:
>
> 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 agree that this is a good idea. I think it could be done in this patch. But to be sure, could you elaborate on what do you mean by first-class citizen?

> 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.

Do you have a link to the proposal? What do you mean by the ability to configure? As in having a config file or registering aliases in modules like now? If you mean the former, I think that is better addressed in a follow-up patch.

> 3. Use aliases to map clang-diagnostic- checks to check names under cert-, hicpp-, etc.
> 
>   I didn't carefully consider all possible implications and there may be issues with any or all of the three parts of this, but I think it's worth exploring.




https://reviews.llvm.org/D38171





More information about the cfe-commits mailing list