[cfe-dev] clang-tidy, clang-modernize, and remove-cstr-calls
Mario Lang
mlang at delysid.org
Fri Jan 30 13:25:54 PST 2015
Richard <legalize at xmission.com> writes:
> Should remove-cstr-calls be migrated to a clang-tidy check?
I've thought the same in the past, and I think yes. It would fit clang-tidy.
> What about clang-modernize? Are the transformations there considered
> to be of the lint variety? Should those transformations be migrated
> to clang-tidy as well?
I think clang-modernize should stay separate, as it doesn't strictly
search for programming errors of inefficiencies. It is really a source-code upgrade
tool, something you run once you've decided to switch your standard
level. One might argue that clang-modernize could be run as part of
clang-tidy, if LangOpts specified CPlusPlus11, but I am not convinced.
OTOH, the check-enabling syntax of clang-tidy makes it rather easy to
run modernize as part of it... "clang-tidy -fix -checks=modernize"
wouldn't be particularily hard to type. But keep in mind that clang-modernize seems
to be able to run without a compilation database, which doesn't apply to
clang-tidy.
--
CYa,
⡍⠁⠗⠊⠕
More information about the cfe-dev
mailing list