================ @@ -0,0 +1,11 @@ +// REQUIRES: clangd-tidy-checks +// RUN: cp %s %t.cpp +// RUN: clangd -enable-config=0 -clang-tidy=0 -check=%t.cpp -check-tidy-time=-* 2>&1 | FileCheck %s + +// Time only baseline builds to avoid timing-stability retries. +// CHECK: Timing AST build with individual clang-tidy checks +// CHECK: Baseline = +// CHECK: Finished individual clang-tidy checks +// CHECK: All checks completed, 0 errors ---------------- ArcsinX wrote:
> Overall I think it comes down to how much work you think keeping this > behaviour is (since you said you already broke it, maybe it is more of a > hassle and we should just drop it?) Keep this behavior required only 1 line change in thecode. TLDR; In current implementation `-clang-tidy=0` means that we don't create clang-tidy provider [here](https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/tool/ClangdMain.cpp#L1022). But when `-clang-tidy-time` is specified, we create another clang-tidy providers [here](https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/tool/Check.cpp#L325). So, it's a bit inconsistent, that we disable clang-tidy via `-clang-tidy=0`, but still can run tidy checks via `-clang-tidy-time`. So, this works just because `-clang-tidy-time` and `-clang-tidy` are independent. With clang-tidy as a feature module, my try was just not to create clang-tidy feature module if `-clang-tidy=0`, but as it turns, we still need it to support provider change if `-clang-tidy-time` is specified. And solution was to create clang-tidy feature module if clang-tidy is enabled or we are in check mode (1 line change as I mentioned above) https://github.com/llvm/llvm-project/pull/231461 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
