<div dir="ltr">(The slightly more usual fix is to do `const char kFoo[] = R"cpp(...)cpp"; EXPECT_TRUE(matches(kFoo...)`)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 6, 2019 at 3:13 PM Matthias Gehre 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">Author: mgehre<br>
Date: Fri Sep 6 12:15:02 2019<br>
New Revision: 371241<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=371241&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=371241&view=rev</a><br>
Log:<br>
[LifetimeAnalysis] don't use raw string literals in macros<br>
<br>
They broke the AArch64 bots (gcc does not support it)<br>
<br>
Modified:<br>
cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp<br>
<br>
Modified: cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp?rev=371241&r1=371240&r2=371241&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp?rev=371241&r1=371240&r2=371241&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp (original)<br>
+++ cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp Fri Sep 6 12:15:02 2019<br>
@@ -14,48 +14,42 @@ namespace clang {<br>
using namespace ast_matchers;<br>
<br>
TEST(OwnerPointer, BothHaveAttributes) {<br>
- EXPECT_TRUE(matches(<br>
- R"cpp(<br>
- template<class T><br>
- class [[gsl::Owner]] C;<br>
-<br>
- template<class T><br>
- class [[gsl::Owner]] C {};<br>
-<br>
- C<int> c;<br>
- )cpp",<br>
- classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner))));<br>
+ EXPECT_TRUE(matches("template<class T>"<br>
+ "class [[gsl::Owner]] C;"<br>
+<br>
+ "template<class T>"<br>
+ "class [[gsl::Owner]] C {};"<br>
+<br>
+ "C<int> c;",<br>
+ classTemplateSpecializationDecl(<br>
+ hasName("C"), hasAttr(clang::attr::Owner))));<br>
}<br>
<br>
TEST(OwnerPointer, ForwardDeclOnly) {<br>
- EXPECT_TRUE(matches(<br>
- R"cpp(<br>
- template<class T><br>
- class [[gsl::Owner]] C;<br>
-<br>
- template<class T><br>
- class C {};<br>
-<br>
- C<int> c;<br>
- )cpp",<br>
- classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner))));<br>
+ EXPECT_TRUE(matches("template<class T>"<br>
+ "class [[gsl::Owner]] C;"<br>
+<br>
+ "template<class T>"<br>
+ "class C {};"<br>
+<br>
+ "C<int> c;",<br>
+ classTemplateSpecializationDecl(<br>
+ hasName("C"), hasAttr(clang::attr::Owner))));<br>
}<br>
<br>
TEST(OwnerPointer, LateForwardDeclOnly) {<br>
- EXPECT_TRUE(matches(<br>
- R"cpp(<br>
- template<class T><br>
- class C;<br>
-<br>
- template<class T><br>
- class C {};<br>
-<br>
- template<class T><br>
- class [[gsl::Owner]] C;<br>
-<br>
- C<int> c;<br>
- )cpp",<br>
- classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner))));<br>
+ EXPECT_TRUE(matches("template<class T>"<br>
+ "class C;"<br>
+<br>
+ "template<class T>"<br>
+ "class C {};"<br>
+<br>
+ "template<class T>"<br>
+ "class [[gsl::Owner]] C;"<br>
+<br>
+ "C<int> c;",<br>
+ classTemplateSpecializationDecl(<br>
+ hasName("C"), hasAttr(clang::attr::Owner))));<br>
}<br>
<br>
} // namespace clang<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>