llvm-project/clang-tools-extra/unittests/clangd
Ilya Biryukov be0eb8f498 [clangd] Serve comments for headers decls from dynamic index only
Summary:
To fix a crash in code completion that occurrs when reading doc
comments from files that were updated after the preamble was
computed. In that case, the files on disk could've been changed and we
can't rely on finding the comment text with the same range anymore.

The current workaround is to not provide comments from the headers at
all and rely on the dynamic index instead.

A more principled solution would be to store contents of the files
read inside the preamble, but it is way harder to implement properly,
given that it would definitely increase the sizes of the preamble.

Together with D47272, this should fix all preamble-related crashes
we're aware of.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: klimek, ioeric, MaskRay, jkorous, cfe-commits

Differential Revision: https://reviews.llvm.org/D47274

llvm-svn: 333189
2018-05-24 14:49:23 +00:00
..
Annotations.cpp [clangd] Add line and column number to the index symbol. 2018-04-13 08:30:39 +00:00
Annotations.h [clangd] Add line and column number to the index symbol. 2018-04-13 08:30:39 +00:00
CMakeLists.txt [clangd] Fix a link failure in unittests 2018-05-16 08:53:57 +00:00
ClangdTests.cpp [clangd] Remove LSP command-based #include insertion. 2018-05-15 15:23:53 +00:00
ClangdUnitTests.cpp [clangd] Extract scoring/ranking logic, and shave yaks. 2018-05-15 17:43:27 +00:00
CodeCompleteTests.cpp [clangd] Serve comments for headers decls from dynamic index only 2018-05-24 14:49:23 +00:00
CodeCompletionStringsTests.cpp [clangd] Retrieve minimally formatted comment text in completion. 2018-05-16 12:32:44 +00:00
ContextTests.cpp [clangd] Introduced a Context that stores implicit data 2017-12-12 11:16:45 +00:00
DraftStoreTests.cpp [clangd] Fix unicode handling, using UTF-16 where LSP requires it. 2018-04-27 11:59:28 +00:00
FileIndexTests.cpp [clangd] Extract scoring/ranking logic, and shave yaks. 2018-05-15 17:43:27 +00:00
FindSymbolsTests.cpp [clangd] Initialize candidate count in unit test 2018-04-24 17:57:53 +00:00
FuzzyMatchTests.cpp [clangd] Address missed comments from D44003 2018-03-06 14:30:07 +00:00
GlobalCompilationDatabaseTests.cpp Parse .h files as objective-c++ if we don't have a compile command. 2018-04-20 11:35:17 +00:00
HeadersTests.cpp [clangd] Populate #include insertions as additional edits in completion items. 2018-05-15 15:29:32 +00:00
IndexTests.cpp [clangd] Add an interface that finds symbol by SymbolID in SymbolIndex. 2018-03-14 09:48:05 +00:00
JSONExprTests.cpp [clangd] Use operator<< to prevent printers issues in Gtest 2018-04-10 17:34:46 +00:00
Matchers.h [clangd] Fix crash when CompilerInvocation can't be created. 2018-02-09 13:51:57 +00:00
QualityTests.cpp Silence more truncation warnings; NFC. 2018-05-18 14:53:32 +00:00
SourceCodeTests.cpp [clangd] Fix unicode handling, using UTF-16 where LSP requires it. 2018-04-27 11:59:28 +00:00
SymbolCollectorTests.cpp [clangd] Skip .inc headers when canonicalizing header #include. 2018-05-24 14:40:24 +00:00
SyncAPI.cpp [clangd] Implementation of workspace/symbol request 2018-04-23 20:00:52 +00:00
SyncAPI.h [clangd] Implementation of workspace/symbol request 2018-04-23 20:00:52 +00:00
TUSchedulerTests.cpp [clangd] Don't expose vfs in TUScheduler::runWithPreamble. 2018-03-14 17:46:52 +00:00
TestFS.cpp [clangd] Extract scoring/ranking logic, and shave yaks. 2018-05-15 17:43:27 +00:00
TestFS.h [clangd] Remove Tagged and some related APIs from ClangdServer. 2018-03-12 23:22:35 +00:00
TestScheme.h [clangd] Allow using customized include path in URI. 2018-04-09 15:09:44 +00:00
TestTU.cpp [clangd] Extract scoring/ranking logic, and shave yaks. 2018-05-15 17:43:27 +00:00
TestTU.h [clangd] Extract scoring/ranking logic, and shave yaks. 2018-05-15 17:43:27 +00:00
ThreadingTests.cpp [clangd] Tracing: name worker threads, and enforce naming scheduled async tasks 2018-02-19 09:56:28 +00:00
TraceTests.cpp Fix misuse of llvm::YAML in clangd test. 2018-03-23 19:16:07 +00:00
URITests.cpp s/LLVM_ON_WIN32/_WIN32/, clang-tools-extra 2018-04-10 13:14:03 +00:00
XRefsTests.cpp [clangd] Extract scoring/ranking logic, and shave yaks. 2018-05-15 17:43:27 +00:00