[PATCH] [clang-tidy] Support for Static Analyzer plugins

Alexander Kornienko alexfh at google.com
Thu May 7 06:29:55 PDT 2015


================
Comment at: clang-tidy/tool/ClangTidyMain.cpp:286
@@ -301,3 +285,3 @@
   ClangTidyStats Stats =
       runClangTidy(std::move(OptionsProvider), OptionsParser.getCompilations(),
                    OptionsParser.getSourcePathList(), &Errors,
----------------
xazax.hun wrote:
> alexfh wrote:
> > xazax.hun wrote:
> > > My biggest concern so far is that, the list of available checkers are determined dynamically once the compiler is instantiated. For this reason I had to move check listing and some error diagnostic after actually running the tool. This might not be a too big usability issue though, since it was not possible to list the available checkers without input files anyways. However it would be harder to improve on that after this patch is applied.
> > A clarification regarding the current state: a file name on the command line is currently needed to find a directory to read configuration from. The file doesn't have to exist as the analysis isn't run when we just want to list the checks.
> > 
> > As for the requirement to run the analysis in order to get the list of checks: I don't think it's a good idea. Do you just need this to parse the command line?
> Yes, I think that I only need the plugin list from the command line. If there is a nice way to get that without actually running a clang tool that could work this issue around. 
It should be possible to reuse command-line parsing on some level. I'd prefer a level where we don't need an actual input file.

http://reviews.llvm.org/D9555

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list