[clang-tools-extra] 041650d - [clangd] Extract string literals in macro arguments to unbreak gcc buildbots
Kadir Cetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 15 08:59:20 PST 2020
Author: Kadir Cetinkaya
Date: 2020-01-15T17:59:10+01:00
New Revision: 041650da67051266eb92b5bb07223394fe1bdab1
URL: https://github.com/llvm/llvm-project/commit/041650da67051266eb92b5bb07223394fe1bdab1
DIFF: https://github.com/llvm/llvm-project/commit/041650da67051266eb92b5bb07223394fe1bdab1.diff
LOG: [clangd] Extract string literals in macro arguments to unbreak gcc buildbots
Added:
Modified:
clang-tools-extra/clangd/unittests/HoverTests.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/unittests/HoverTests.cpp b/clang-tools-extra/clangd/unittests/HoverTests.cpp
index d30c9bfb90ff..385c064a9dce 100644
--- a/clang-tools-extra/clangd/unittests/HoverTests.cpp
+++ b/clang-tools-extra/clangd/unittests/HoverTests.cpp
@@ -1759,7 +1759,7 @@ TEST(Hover, PresentRulers) {
HI.Value = "val";
HI.Definition = "def";
- EXPECT_EQ(HI.present().asMarkdown(), R"md(### variable `foo`
+ llvm::StringRef ExpectedMarkdown = R"md(### variable `foo`
---
Value \= `val`
@@ -1767,12 +1767,15 @@ Value \= `val`
---
```cpp
def
-```)md");
- EXPECT_EQ(HI.present().asPlainText(), R"pt(variable foo
+```)md";
+ EXPECT_EQ(HI.present().asMarkdown(), ExpectedMarkdown);
+
+ llvm::StringRef ExpectedPlaintext = R"pt(variable foo
Value = val
-def)pt");
+def)pt";
+ EXPECT_EQ(HI.present().asPlainText(), ExpectedPlaintext);
}
TEST(Hover, ExprTests) {
More information about the cfe-commits
mailing list