[all-commits] [llvm/llvm-project] 73fdd9: [clangd] Implement clang-tidy options from config
Nathan James via All-commits
all-commits at lists.llvm.org
Wed Nov 25 10:39:55 PST 2020
Branch: refs/heads/temp-test-main
Home: https://github.com/llvm/llvm-project
Commit: 73fdd998701cce3aa6c4d8d2a73ab97351a0313b
https://github.com/llvm/llvm-project/commit/73fdd998701cce3aa6c4d8d2a73ab97351a0313b
Author: Nathan James <n.james93 at hotmail.co.uk>
Date: 2020-11-25 (Wed, 25 Nov 2020)
Changed paths:
M clang-tools-extra/clangd/CMakeLists.txt
M clang-tools-extra/clangd/ClangdServer.cpp
M clang-tools-extra/clangd/ClangdServer.h
M clang-tools-extra/clangd/Compiler.h
M clang-tools-extra/clangd/ParsedAST.cpp
A clang-tools-extra/clangd/TidyProvider.cpp
A clang-tools-extra/clangd/TidyProvider.h
M clang-tools-extra/clangd/tool/Check.cpp
M clang-tools-extra/clangd/tool/ClangdMain.cpp
M clang-tools-extra/clangd/unittests/ClangdTests.cpp
M clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
M clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
M clang-tools-extra/clangd/unittests/TestTU.cpp
M clang-tools-extra/clangd/unittests/TestTU.h
Log Message:
-----------
[clangd] Implement clang-tidy options from config
Added some new ClangTidyOptionsProvider like classes designed for clangd work flow.
These providers are designed to source the options on the worker thread but in a thread safe manner.
This is done through making the options getter take a pointer to the filesystem used by the worker thread which natuarally is from a ThreadsafeFS.
Internal caching in the providers is also guarded.
The providers don't inherit from `ClangTidyOptionsProvider` instead they share a base class which is able to create a provider for the `ClangTidyContext` using a specific FileSystem.
This approach means one provider can be used for multiple contexts even though `ClangTidyContext` owns its provider.
Depends on D90531
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D91029
More information about the All-commits
mailing list