summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/unittests/clangd/FileDistanceTests.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/unittests/clangd/FileDistanceTests.cpp b/clang-tools-extra/unittests/clangd/FileDistanceTests.cpp
index 0d5afc9a9b1..acce245bf58 100644
--- a/clang-tools-extra/unittests/clangd/FileDistanceTests.cpp
+++ b/clang-tools-extra/unittests/clangd/FileDistanceTests.cpp
@@ -58,7 +58,8 @@ TEST(FileDistanceTests, BadSource) {
EXPECT_EQ(D.distance("b/b/b/c"), 17u); // a+up+down+down+down+down, not b+down
}
-auto UseUnittestScheme = UnittestSchemeAnchorSource;
+// Force the unittest URI scheme to be linked,
+static int LLVM_ATTRIBUTE_UNUSED UseUnittestScheme = UnittestSchemeAnchorSource;
TEST(FileDistanceTests, URI) {
FileDistanceOptions Opts;
OpenPOWER on IntegriCloud