[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 3 08:54:49 PDT 2018


alexfh requested changes to this revision.
alexfh added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang-tidy/ClangTidy.cpp:536
+                       DiagnosticConsumer *DiagConsumer) override {
+      Invocation->getFrontendOpts().ProgramAction = frontend::RunAnalysis;
+      return FrontendActionFactory::runInvocation(
----------------
I would add a comment that we only do this to define the analyzer-specific macro, not to actually use the analyzer frontend action.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D46325





More information about the cfe-commits mailing list