[PATCH] D68273: [clangd] Fix raciness in code completion tests

2019-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373924: [clangd] Fix raciness in code completion tests (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

[PATCH] D68273: [clangd] Fix raciness in code completion tests

2019-10-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:1141 +ReceivedRequestCV.wait(Lock,

[PATCH] D68273: [clangd] Fix raciness in code completion tests

2019-10-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:1141 +ReceivedRequestCV.wait(Lock, + [this, Num] { return NumRequestsReceived == Num; }); +NumRequestsReceived = 0; ilya-biryuko

[PATCH] D68273: [clangd] Fix raciness in code completion tests

2019-10-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 222890. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68273/new/ https://reviews.llvm.org/D68273 Files: clang-tools-ex

[PATCH] D68273: [clangd] Fix raciness in code completion tests

2019-10-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. It just hit me that we should probably just wait for the async request to finish before returning from completion. We might be doing this to reduce latency a little, but I don't recall us measuring that this provides a significant performance win. Would that work?

[PATCH] D68273: [clangd] Fix raciness in code completion tests

2019-10-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 222618. kadircet added a comment. - As discussed offline, making `consumeRequests` take an argument for how many requests to receive before returning. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68273/new/

[PATCH] D68273: [clangd] Fix raciness in code completion tests

2019-10-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This is still racy if there were > 1 request. I wonder if there a better way to address this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68273/new/ https://reviews.llvm.org/D68273 __

[PATCH] D68273: [clangd] Fix raciness in code completion tests

2019-10-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68273 Files: clang-tools-extra/clangd