r371241 - [LifetimeAnalysis] don't use raw string literals in macros
Matthias Gehre via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 6 12:15:02 PDT 2019
Author: mgehre
Date: Fri Sep 6 12:15:02 2019
New Revision: 371241
URL: http://llvm.org/viewvc/llvm-project?rev=371241&view=rev
Log:
[LifetimeAnalysis] don't use raw string literals in macros
They broke the AArch64 bots (gcc does not support it)
Modified:
cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp
Modified: cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp?rev=371241&r1=371240&r2=371241&view=diff
==============================================================================
--- cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp (original)
+++ cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp Fri Sep 6 12:15:02 2019
@@ -14,48 +14,42 @@ namespace clang {
using namespace ast_matchers;
TEST(OwnerPointer, BothHaveAttributes) {
- EXPECT_TRUE(matches(
- R"cpp(
- template<class T>
- class [[gsl::Owner]] C;
-
- template<class T>
- class [[gsl::Owner]] C {};
-
- C<int> c;
- )cpp",
- classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner))));
+ EXPECT_TRUE(matches("template<class T>"
+ "class [[gsl::Owner]] C;"
+
+ "template<class T>"
+ "class [[gsl::Owner]] C {};"
+
+ "C<int> c;",
+ classTemplateSpecializationDecl(
+ hasName("C"), hasAttr(clang::attr::Owner))));
}
TEST(OwnerPointer, ForwardDeclOnly) {
- EXPECT_TRUE(matches(
- R"cpp(
- template<class T>
- class [[gsl::Owner]] C;
-
- template<class T>
- class C {};
-
- C<int> c;
- )cpp",
- classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner))));
+ EXPECT_TRUE(matches("template<class T>"
+ "class [[gsl::Owner]] C;"
+
+ "template<class T>"
+ "class C {};"
+
+ "C<int> c;",
+ classTemplateSpecializationDecl(
+ hasName("C"), hasAttr(clang::attr::Owner))));
}
TEST(OwnerPointer, LateForwardDeclOnly) {
- EXPECT_TRUE(matches(
- R"cpp(
- template<class T>
- class C;
-
- template<class T>
- class C {};
-
- template<class T>
- class [[gsl::Owner]] C;
-
- C<int> c;
- )cpp",
- classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner))));
+ EXPECT_TRUE(matches("template<class T>"
+ "class C;"
+
+ "template<class T>"
+ "class C {};"
+
+ "template<class T>"
+ "class [[gsl::Owner]] C;"
+
+ "C<int> c;",
+ classTemplateSpecializationDecl(
+ hasName("C"), hasAttr(clang::attr::Owner))));
}
} // namespace clang
More information about the cfe-commits
mailing list