[clang-tools-extra] 7c2990b - [clangd] Fix data race in GoToInclude.All test
Kadir Cetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 18 23:53:07 PST 2020
Author: Kadir Cetinkaya
Date: 2020-11-19T08:47:43+01:00
New Revision: 7c2990b8af6f906a431b14951e831647d9bbb090
URL: https://github.com/llvm/llvm-project/commit/7c2990b8af6f906a431b14951e831647d9bbb090
DIFF: https://github.com/llvm/llvm-project/commit/7c2990b8af6f906a431b14951e831647d9bbb090.diff
LOG: [clangd] Fix data race in GoToInclude.All test
Added:
Modified:
clang-tools-extra/clangd/unittests/XRefsTests.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/unittests/XRefsTests.cpp b/clang-tools-extra/clangd/unittests/XRefsTests.cpp
index 31d2a37f64a7..c3c87bd628bd 100644
--- a/clang-tools-extra/clangd/unittests/XRefsTests.cpp
+++ b/clang-tools-extra/clangd/unittests/XRefsTests.cpp
@@ -1259,8 +1259,8 @@ TEST(GoToInclude, All) {
Annotations HeaderAnnotations(HeaderContents);
FS.Files[FooH] = std::string(HeaderAnnotations.code());
- Server.addDocument(FooH, HeaderAnnotations.code());
- Server.addDocument(FooCpp, SourceAnnotations.code());
+ runAddDocument(Server, FooH, HeaderAnnotations.code());
+ runAddDocument(Server, FooCpp, SourceAnnotations.code());
// Test include in preamble.
auto Locations = runLocateSymbolAt(Server, FooCpp, SourceAnnotations.point());
@@ -1307,7 +1307,7 @@ TEST(GoToInclude, All) {
auto FooM = testPath("foo.m");
FS.Files[FooM] = std::string(ObjC.code());
- Server.addDocument(FooM, ObjC.code());
+ runAddDocument(Server, FooM, ObjC.code());
Locations = runLocateSymbolAt(Server, FooM, ObjC.point());
ASSERT_TRUE(bool(Locations)) << "locateSymbolAt returned an error";
EXPECT_THAT(*Locations, ElementsAre(Sym("foo.h", HeaderAnnotations.range(),
More information about the cfe-commits
mailing list