r367885 - [AST] Fix RecursiveASTVisitorTest multiline string literal. NFC
David Green via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 5 09:27:36 PDT 2019
Author: dmgreen
Date: Mon Aug 5 09:27:36 2019
New Revision: 367885
URL: http://llvm.org/viewvc/llvm-project?rev=367885&view=rev
Log:
[AST] Fix RecursiveASTVisitorTest multiline string literal. NFC
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.
Modified:
cfe/trunk/unittests/Tooling/RecursiveASTVisitorTests/ImplicitCtorInitializer.cpp
Modified: cfe/trunk/unittests/Tooling/RecursiveASTVisitorTests/ImplicitCtorInitializer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/RecursiveASTVisitorTests/ImplicitCtorInitializer.cpp?rev=367885&r1=367884&r2=367885&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/RecursiveASTVisitorTests/ImplicitCtorInitializer.cpp (original)
+++ cfe/trunk/unittests/Tooling/RecursiveASTVisitorTests/ImplicitCtorInitializer.cpp Mon Aug 5 09:27:36 2019
@@ -41,7 +41,7 @@ TEST(RecursiveASTVisitor, CXXCtorInitial
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, CXXCtorInitial
class C : public A {
C() : A() {}
};
- )cpp",
- CXXCtorInitializerVisitor::Lang_CXX));
+ )cpp";
+ EXPECT_TRUE(Visitor.runOver(Code, CXXCtorInitializerVisitor::Lang_CXX));
EXPECT_EQ(Visitor.VisitedImplicitInitializer, VisitImplCode);
}
}
More information about the cfe-commits
mailing list