NoQ added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:54-60
+#include "../../clang-tools-extra/clang-tidy/ClangTidyCheck.h"
+#include "../../clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h"
+#include "../../clang-tools-extra/clang-tidy/ClangTidyForceLinker.h"
+#include "../../clang-tools-extra/clang-tidy/ClangTidyModule.h"
+#include "../../clang-tools-extra/clang-tidy/ClangTidyModuleRegistry.h"
+#include "../../clang-tools-extra/clang-tidy/ClangTidyOptions.h"
+#include "../../clang-tools-extra/clang-tidy/ClangTidyProfiling.h"
----------------
alexfh wrote:
> Isn't this a layering violation, since clang-tidy depends on 
> clangStaticAnalyzerCore and clangStaticAnalyzerFrontend?
Yes, absolutely.

That said, the only purpose of clang-tidy's dependency on libStaticAnalyzer* is 
integration of static analyzer into clang tidy which is definitely not 
something we want to enable when we're baking clang-tidy back into clang. It 
never makes sense to run static analyzer through clang-tidy integration into 
static analyzer.

So ideally these two dependencies are temporally separated. I could make these 
dependencies mutually exclusive by making the upcoming option of baking 
clang-tidy into clang explicitly incompatible with 
`CLANG_TIDY_ENABLE_STATIC_ANALYZER`.

But if we want to support building both clang-tidy with static analyzer and 
static analyzer with clang-tidy from the same sources into the same build 
directory, that'll probably involve either building two variants of clang-tidy 
(one with static analyzer for standalone clang-tidy binary and one without to 
use inside clang binary only) or two variants of static analyzer (one with 
clang-tidy for the clang binary and one without to use inside clang-tidy binary 
only).

Do you have any preference on how should i untangle this?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95403/new/

https://reviews.llvm.org/D95403

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to