Commit Graph

2 Commits

Author SHA1 Message Date
Nathan James dfac97d557
[clangd] Validate clang-tidy Checks in clangd config.
Add instrumentation in ConfigCompile to validate that items in ClangTidy:[Add|Remove] correspond to actual clang-tidy checks.
If they don't a warning will be presented to the user.

This is especially useful for catching typos in the glob items.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D92874
2020-12-15 21:10:57 +00:00
Nathan James 73fdd99870
[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
2020-11-25 18:35:35 +00:00