summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests/clangd/XRefsTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/unittests/clangd/XRefsTests.cpp')
-rw-r--r--clang-tools-extra/unittests/clangd/XRefsTests.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/clang-tools-extra/unittests/clangd/XRefsTests.cpp b/clang-tools-extra/unittests/clangd/XRefsTests.cpp
index 7cde91cfc47..a7fdc847072 100644
--- a/clang-tools-extra/unittests/clangd/XRefsTests.cpp
+++ b/clang-tools-extra/unittests/clangd/XRefsTests.cpp
@@ -42,7 +42,7 @@ using testing::UnorderedElementsAreArray;
class IgnoreDiagnostics : public DiagnosticsConsumer {
void onDiagnosticsReady(PathRef File,
- Tagged<std::vector<Diag>> Diagnostics) override {}
+ std::vector<Diag> Diagnostics) override {}
};
// FIXME: this is duplicated with FileIndexTests. Share it.
@@ -266,9 +266,8 @@ int baz = f^oo;
runFindDefinitions(Server, FooCpp, SourceAnnotations.point());
EXPECT_TRUE(bool(Locations)) << "findDefinitions returned an error";
- EXPECT_THAT(
- Locations->Value,
- ElementsAre(Location{URIForFile{FooCpp}, SourceAnnotations.range()}));
+ EXPECT_THAT(*Locations, ElementsAre(Location{URIForFile{FooCpp},
+ SourceAnnotations.range()}));
}
TEST(Hover, All) {
@@ -609,38 +608,38 @@ TEST(GoToInclude, All) {
auto Locations =
runFindDefinitions(Server, FooCpp, SourceAnnotations.point());
ASSERT_TRUE(bool(Locations)) << "findDefinitions returned an error";
- EXPECT_THAT(Locations->Value,
+ EXPECT_THAT(*Locations,
ElementsAre(Location{FooHUri, HeaderAnnotations.range()}));
// Test include in preamble, last char.
Locations = runFindDefinitions(Server, FooCpp, SourceAnnotations.point("2"));
ASSERT_TRUE(bool(Locations)) << "findDefinitions returned an error";
- EXPECT_THAT(Locations->Value,
+ EXPECT_THAT(*Locations,
ElementsAre(Location{FooHUri, HeaderAnnotations.range()}));
Locations = runFindDefinitions(Server, FooCpp, SourceAnnotations.point("3"));
ASSERT_TRUE(bool(Locations)) << "findDefinitions returned an error";
- EXPECT_THAT(Locations->Value,
+ EXPECT_THAT(*Locations,
ElementsAre(Location{FooHUri, HeaderAnnotations.range()}));
// Test include outside of preamble.
Locations = runFindDefinitions(Server, FooCpp, SourceAnnotations.point("6"));
ASSERT_TRUE(bool(Locations)) << "findDefinitions returned an error";
- EXPECT_THAT(Locations->Value,
+ EXPECT_THAT(*Locations,
ElementsAre(Location{FooHUri, HeaderAnnotations.range()}));
// Test a few positions that do not result in Locations.
Locations = runFindDefinitions(Server, FooCpp, SourceAnnotations.point("4"));
ASSERT_TRUE(bool(Locations)) << "findDefinitions returned an error";
- EXPECT_THAT(Locations->Value, IsEmpty());
+ EXPECT_THAT(*Locations, IsEmpty());
Locations = runFindDefinitions(Server, FooCpp, SourceAnnotations.point("5"));
ASSERT_TRUE(bool(Locations)) << "findDefinitions returned an error";
- EXPECT_THAT(Locations->Value, IsEmpty());
+ EXPECT_THAT(*Locations, IsEmpty());
Locations = runFindDefinitions(Server, FooCpp, SourceAnnotations.point("7"));
ASSERT_TRUE(bool(Locations)) << "findDefinitions returned an error";
- EXPECT_THAT(Locations->Value, IsEmpty());
+ EXPECT_THAT(*Locations, IsEmpty());
}
} // namespace
OpenPOWER on IntegriCloud