diff --git a/clang-tools-extra/clangd/unittests/PreambleTests.cpp b/clang-tools-extra/clangd/unittests/PreambleTests.cpp --- a/clang-tools-extra/clangd/unittests/PreambleTests.cpp +++ b/clang-tools-extra/clangd/unittests/PreambleTests.cpp @@ -230,8 +230,8 @@ TEST(PreamblePatchTest, Define) { // BAR should be defined while parsing the AST. struct { - llvm::StringLiteral Contents; - llvm::StringLiteral ExpectedPatch; + const char *const Contents; + const char *const ExpectedPatch; } Cases[] = { { R"cpp( @@ -270,7 +270,7 @@ SCOPED_TRACE(Case.Contents); Annotations Modified(Case.Contents); EXPECT_THAT(getPreamblePatch("", Modified.code()), - MatchesRegex(Case.ExpectedPatch.str())); + MatchesRegex(Case.ExpectedPatch)); auto AST = createPatchedAST("", Modified.code()); ASSERT_TRUE(AST); @@ -304,8 +304,8 @@ TEST(PreamblePatchTest, LocateMacroAtWorks) { struct { - llvm::StringLiteral Baseline; - llvm::StringLiteral Modified; + const char *const Baseline; + const char *const Modified; } Cases[] = { // Addition of new directive { @@ -417,8 +417,8 @@ TEST(PreamblePatchTest, RefsToMacros) { struct { - llvm::StringLiteral Baseline; - llvm::StringLiteral Modified; + const char *const Baseline; + const char *const Modified; } Cases[] = { // Newly added { @@ -491,8 +491,8 @@ TEST(PreamblePatch, ModifiedBounds) { struct { - llvm::StringLiteral Baseline; - llvm::StringLiteral Modified; + const char *const Baseline; + const char *const Modified; } Cases[] = { // Size increased {