4

When running clang-tidy (with almost all checks enabled) I noticed I've had to suppress a warning under multiple aliases, and sometimes a warning shows up multiple times under different aliases.

Usually this is something I ignore, but after setting the ShortStatementLines option for readability-braces-around-statements I had to add the same option for its aliases google-readability-braces-around-statements and hicpp-braces-around-statements.

What I found.

In a bug report (linked below) Nathan James suggests disabling the aliases is preferred to prevent repeated execution.
In a LLVM review for an abandoned change it is suggested that there are configurations that enable both original and aliases of checks, and that there might be differences in configuration between them.

This leads to my questions

  • Do the aliases always result in duplicate execution of checks, or only in specific circumstances?
    For example when setting CheckOptions.
  • Wouldn't it then be better to disable all aliases manually in a .clang-tidy file?
    It seems that it should reduce the time needed to run the checks.

Links

Farway
  • 741
  • 10
  • 13

0 Answers0