<div dir="ltr">Might be handy to link to a buildbot and/or quote the specific error message in the commit message for changes like this so it's clear what's being addressed by the change.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 19, 2020 at 4:58 AM Sam McCall via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Sam McCall<br>
Date: 2020-05-19T13:58:23+02:00<br>
New Revision: 61559d045868e3980deca6cf5d30ad8816951960<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/61559d045868e3980deca6cf5d30ad8816951960" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/61559d045868e3980deca6cf5d30ad8816951960</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/61559d045868e3980deca6cf5d30ad8816951960.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/61559d045868e3980deca6cf5d30ad8816951960.diff</a><br>
<br>
LOG: [clangd] Squash GCC error with StringRef + gtest MatchesRegex()<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
clang-tools-extra/clangd/unittests/support/TraceTests.cpp<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff --git a/clang-tools-extra/clangd/unittests/support/TraceTests.cpp b/clang-tools-extra/clangd/unittests/support/TraceTests.cpp<br>
index cee43f73f211..953002b69a46 100644<br>
--- a/clang-tools-extra/clangd/unittests/support/TraceTests.cpp<br>
+++ b/clang-tools-extra/clangd/unittests/support/TraceTests.cpp<br>
@@ -170,12 +170,16 @@ TEST_F(CSVMetricsTracerTest, RecordsValues) {<br>
Counter.record(1, "");<br>
Dist.record(2, "y");<br>
<br>
- EXPECT_THAT(<br>
- outputLines(),<br>
+ auto Lines = outputLines();<br>
+ ASSERT_THAT(<br>
+ Lines,<br>
ElementsAre("Kind,Metric,Label,Value,Timestamp",<br>
- MatchesRegex(R"(d,dist,x,1\.000000e\+00,[0-9]+\.[0-9]{6})"),<br>
+ StartsWith("d,dist,x,1.000000e+00,"),<br>
StartsWith("c,cnt,,1.000000e+00,"),<br>
StartsWith("d,dist,y,2.000000e+00,"), ""));<br>
+ // Also check timestamp format.<br>
+ EXPECT_THAT(Lines[1].str(),<br>
+ MatchesRegex(R"(d,dist,x,1\.000000e\+00,[0-9]+\.[0-9]{6})"));<br>
}<br>
<br>
TEST_F(CSVMetricsTracerTest, Escaping) {<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>