summaryrefslogtreecommitdiff
path: root/clang-tools-extra/test/clangd
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2018-06-05 09:34:46 +0000
committerSam McCall <sam.mccall@gmail.com>2018-06-05 09:34:46 +0000
commite1479cadca7b1c74064b42d063a44672092b321c (patch)
tree89bbda27bb8392762401c62a08a0121167287f8e /clang-tools-extra/test/clangd
parent977d5d0340961377816ec2ea0211353a4e4839d1 (diff)
[clangd] Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream.
Summary: The EINTR loop around getline was added to fix an issue with mac gdb, but seems to loop infinitely in rare cases on linux where the parent editor exits (most reports with VSCode). I can't work out how to fix this in a portable way with std::istream, but the C APIs have clearer contracts and LLVM has a RetryAfterSignal function for use with them which seems battle-tested. While here, clean up some inconsistency around \n in log messages (now add it only after JSON payloads), and reduce the scope of the long-message handling which was only really added to fight fuzzers. Reviewers: malaperle, ilya-biryukov Subscribers: klimek, ioeric, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47643
Diffstat (limited to 'clang-tools-extra/test/clangd')
-rw-r--r--clang-tools-extra/test/clangd/too_large.test2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/test/clangd/too_large.test b/clang-tools-extra/test/clangd/too_large.test
index 60de800986c..7b846c37f08 100644
--- a/clang-tools-extra/test/clangd/too_large.test
+++ b/clang-tools-extra/test/clangd/too_large.test
@@ -4,4 +4,4 @@
#
Content-Length: 2147483648
-# STDERR: Skipped overly large message
+# STDERR: Refusing to read message