From 4934f013b12b1a8d35efa69165c17eed92c52ff9 Mon Sep 17 00:00:00 2001 From: Matthias Gehre Date: Fri, 6 Sep 2019 19:15:02 +0000 Subject: [PATCH] [LifetimeAnalysis] don't use raw string literals in macros They broke the AArch64 bots (gcc does not support it) llvm-svn: 371241 --- .../Sema/GslOwnerPointerInference.cpp | 52 ++++++++----------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/clang/unittests/Sema/GslOwnerPointerInference.cpp b/clang/unittests/Sema/GslOwnerPointerInference.cpp index e340ccb4127be..5d86a8806cbdd 100644 --- a/clang/unittests/Sema/GslOwnerPointerInference.cpp +++ b/clang/unittests/Sema/GslOwnerPointerInference.cpp @@ -14,48 +14,42 @@ namespace clang { using namespace ast_matchers; TEST(OwnerPointer, BothHaveAttributes) { - EXPECT_TRUE(matches( - R"cpp( - template - class [[gsl::Owner]] C; + EXPECT_TRUE(matches("template" + "class [[gsl::Owner]] C;" - template - class [[gsl::Owner]] C {}; + "template" + "class [[gsl::Owner]] C {};" - C c; - )cpp", - classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner)))); + "C c;", + classTemplateSpecializationDecl( + hasName("C"), hasAttr(clang::attr::Owner)))); } TEST(OwnerPointer, ForwardDeclOnly) { - EXPECT_TRUE(matches( - R"cpp( - template - class [[gsl::Owner]] C; + EXPECT_TRUE(matches("template" + "class [[gsl::Owner]] C;" - template - class C {}; + "template" + "class C {};" - C c; - )cpp", - classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner)))); + "C c;", + classTemplateSpecializationDecl( + hasName("C"), hasAttr(clang::attr::Owner)))); } TEST(OwnerPointer, LateForwardDeclOnly) { - EXPECT_TRUE(matches( - R"cpp( - template - class C; + EXPECT_TRUE(matches("template" + "class C;" - template - class C {}; + "template" + "class C {};" - template - class [[gsl::Owner]] C; + "template" + "class [[gsl::Owner]] C;" - C c; - )cpp", - classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner)))); + "C c;", + classTemplateSpecializationDecl( + hasName("C"), hasAttr(clang::attr::Owner)))); } } // namespace clang