How can I activate “upgrade” checks?

I just installed ClangOnWin and I am trying to do clang-tidy "upgrade" checks. Unfortunately, clang-tidy does not seem to know about them: clang-tidy -list-checks foo.cpp -- | grep modernize clang-tidy -list-checks foo.cpp -- | grep modernize does not output the result.

The “upgrade” checks are listed here , but this page seems to be documenting Clang 3.8, and the version I installed is 3.7. However, version 3.7 is the current version specified on the LLVM Download page.

clang-tidy knows about various security checks, so I believe that it is installed correctly. For example, clang-tidy -list-checks foo.cpp -- | grep security clang-tidy -list-checks foo.cpp -- | grep security gives the following:

 clang-analyzer-security.FloatLoopCounter clang-analyzer-security.insecureAPI.UncheckedReturn clang-analyzer-security.insecureAPI.getpw clang-analyzer-security.insecureAPI.gets clang-analyzer-security.insecureAPI.mkstemp clang-analyzer-security.insecureAPI.mktemp clang-analyzer-security.insecureAPI.rand clang-analyzer-security.insecureAPI.strcpy clang-analyzer-security.insecureAPI.vfork 

Is there something special I need to do to enable checks like modernize-use-override and modernize-use-nullptr ?

+5
clang clang ++ clang-static-analyzer
source share
2 answers

Modified checks were added after 3.7 (ported from clang-modernize), but try adding -checks="*" to see the full list of available checks.

 clang-tidy -list-checks -checks="*" foo.cpp -- 
+3
source share

Have you tried using the official binaries from LLVM: http://llvm.org/releases/download.html ? Perhaps the ClangOnWin binaries are not compiled with all the parameters, or something like that.

+1
source share