File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11
11
#include " ClangdServer.h"
12
12
#include " ConfigProvider.h"
13
13
#include " Diagnostics.h"
14
+ #include " Feature.h"
14
15
#include " FeatureModule.h"
15
16
#include " LSPBinder.h"
16
17
#include " LSPClient.h"
@@ -198,6 +199,9 @@ TEST_F(LSPTest, RecordsLatencies) {
198
199
// clang-tidy's renames are converted to clangd's internal rename functionality,
199
200
// see clangd#1589 and clangd#741
200
201
TEST_F (LSPTest, ClangTidyRename) {
202
+ // This test requires clang-tidy checks to be linked in.
203
+ if (!CLANGD_TIDY_CHECKS)
204
+ return ;
201
205
Annotations Header (R"cpp(
202
206
void [[foo]]();
203
207
)cpp" );
@@ -214,7 +218,9 @@ TEST_F(LSPTest, ClangTidyRename) {
214
218
Client.didOpen (" foo.hpp" , Header.code ());
215
219
Client.didOpen (" foo.cpp" , Source.code ());
216
220
217
- auto RenameDiag = Client.diagnostics (" foo.cpp" ).value ().at (0 );
221
+ auto Diags = Client.diagnostics (" foo.cpp" );
222
+ ASSERT_TRUE (Diags && !Diags->empty ());
223
+ auto RenameDiag = Diags->front ();
218
224
219
225
auto RenameCommand =
220
226
(*Client
You can’t perform that action at this time.
0 commit comments