Back to TIL list

Otimizando código com clang-tidy

Created at

Instalação

apt-get install clang-tidy

Verificadores disponíveis

clang-tidy --list-checks -checks='*' | grep "modernize"    modernize-avoid-bind    modernize-deprecated-headers    modernize-loop-convert    modernize-make-shared    modernize-make-unique    modernize-pass-by-value    modernize-raw-string-literal    modernize-redundant-void-arg    modernize-replace-auto-ptr    modernize-replace-random-shuffle    modernize-return-braced-init-list    modernize-shrink-to-fit    modernize-unary-static-assert    modernize-use-auto    modernize-use-bool-literals    modernize-use-default-member-init    modernize-use-emplace    modernize-use-equals-default    modernize-use-equals-delete    modernize-use-noexcept    modernize-use-nullptr    modernize-use-override    modernize-use-transparent-functors    modernize-use-uncaught-exceptions    modernize-use-using

Uso

clang-tidy -checks='modernize-use-override' -fix test.cpp -- -std=c++11

Referências