]> granicus.if.org Git - clang/commitdiff
[AST] Fix RecursiveASTVisitorTest multiline string literal. NFC
authorDavid Green <david.green@arm.com>
Mon, 5 Aug 2019 16:27:36 +0000 (16:27 +0000)
committerDavid Green <david.green@arm.com>
Mon, 5 Aug 2019 16:27:36 +0000 (16:27 +0000)
Some compiler, notably older gccs (< 8) can have trouble with multiline raw
string literals inside macros. This just moves the code outsize the macro, to
attempt to appease the bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367885 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Tooling/RecursiveASTVisitorTests/ImplicitCtorInitializer.cpp

index 5b133e140e29a38b6ee113c752e2872a93ef3775..bd82a9ac48ccb8eece59708b41f23d6c2d10d9f2 100644 (file)
@@ -41,7 +41,7 @@ TEST(RecursiveASTVisitor, CXXCtorInitializerVisitNoImplicit) {
   for (bool VisitImplCode : {true, false}) {
     CXXCtorInitializerVisitor Visitor(VisitImplCode);
     Visitor.ExpectMatch("initializer", 7, 17);
-    EXPECT_TRUE(Visitor.runOver(R"cpp(
+    auto Code = R"cpp(
         class A {};
         class B : public A {
           B() {};
@@ -49,8 +49,8 @@ TEST(RecursiveASTVisitor, CXXCtorInitializerVisitNoImplicit) {
         class C : public A {
           C() : A() {}
         };
-      )cpp",
-                                CXXCtorInitializerVisitor::Lang_CXX));
+      )cpp";
+    EXPECT_TRUE(Visitor.runOver(Code, CXXCtorInitializerVisitor::Lang_CXX));
     EXPECT_EQ(Visitor.VisitedImplicitInitializer, VisitImplCode);
   }
 }