diff options
| author | Haojian Wu <hokein@google.com> | 2019-01-22 09:39:05 +0000 |
|---|---|---|
| committer | Haojian Wu <hokein@google.com> | 2019-01-22 09:39:05 +0000 |
| commit | 1ca0c58c8152ecfb2a47f91080b64eae7710dadb (patch) | |
| tree | cf967fe3f5caa6c4745dbf4a404a55b015d85cc5 /clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp | |
| parent | bd374b27cc33567b0a0522ee511fc1ea9f0bb1df (diff) | |
| download | bcm5719-llvm-1ca0c58c8152ecfb2a47f91080b64eae7710dadb.tar.gz bcm5719-llvm-1ca0c58c8152ecfb2a47f91080b64eae7710dadb.zip | |
[clangd] Support clang-tidy configuration in clangd.
Summary:
This patch adds some basic supports for clang-tidy configurations in clangd:
- clangd will respect .clang-tidy configurations for each file
- we don't aim to support all clang-tidy options in clangd, only a
small subset of condfigurations (options related to which checks will be
enabled) are supported.
- add a `clang-tidy-checks` CLI option that can override options from
.clang-tidy file
Reviewers: ilya-biryukov, sammccall
Reviewed By: sammccall
Subscribers: javed.absar, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D55256
llvm-svn: 351792
Diffstat (limited to 'clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp')
| -rw-r--r-- | clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp b/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp index 261c9b549b9..79ee779da62 100644 --- a/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp +++ b/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp @@ -38,7 +38,8 @@ class TUSchedulerTests : public ::testing::Test { protected: ParseInputs getInputs(PathRef File, std::string Contents) { return ParseInputs{*CDB.getCompileCommand(File), - buildTestFS(Files, Timestamps), std::move(Contents)}; + buildTestFS(Files, Timestamps), std::move(Contents), + tidy::ClangTidyOptions::getDefaults()}; } void updateWithCallback(TUScheduler &S, PathRef File, |

