[clang-tools-extra] 687e98d - Fix build with older (still supported) gcc versions.
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 14 07:13:59 PST 2019
Author: Nico Weber
Date: 2019-12-14T10:13:15-05:00
New Revision: 687e98d294c4f77e8b431adb7d86dfba5ab84645
URL: https://github.com/llvm/llvm-project/commit/687e98d294c4f77e8b431adb7d86dfba5ab84645
DIFF: https://github.com/llvm/llvm-project/commit/687e98d294c4f77e8b431adb7d86dfba5ab84645.diff
LOG: Fix build with older (still supported) gcc versions.
Older gccs can't handle multiline raw string literals in
macro parameters.
Added:
Modified:
clang-tools-extra/clangd/unittests/FormattedStringTests.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/unittests/FormattedStringTests.cpp b/clang-tools-extra/clangd/unittests/FormattedStringTests.cpp
index 7d57be61f0b2..89ffab6aac0c 100644
--- a/clang-tools-extra/clangd/unittests/FormattedStringTests.cpp
+++ b/clang-tools-extra/clangd/unittests/FormattedStringTests.cpp
@@ -120,16 +120,20 @@ TEST(Document, Separators) {
D.addParagraph().appendText("foo");
D.addCodeBlock("test");
D.addParagraph().appendText("bar");
- EXPECT_EQ(D.asMarkdown(), R"md(foo
+
+ const char ExpectedMarkdown[] = R"md(foo
```cpp
test
```
-bar)md");
- EXPECT_EQ(D.asPlainText(), R"pt(foo
+bar)md";
+ EXPECT_EQ(D.asMarkdown(), ExpectedMarkdown);
+
+ const char ExpectedText[] = R"pt(foo
test
-bar)pt");
+bar)pt";
+ EXPECT_EQ(D.asPlainText(), ExpectedText);
}
TEST(Document, Spacer) {
More information about the cfe-commits
mailing list