From: David Green Date: Sat, 16 Feb 2019 11:19:04 +0000 (+0000) Subject: Move multiline raw string literal out of macro. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=772ba47eb83020bbe2b51c11ed10bbdf54b6284e;p=clang Move multiline raw string literal out of macro. NFC Certain combinations of gcc and ccache fail when the raw string literal is preprocessed. This just moves the string out as is done elsewhere in the same file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354201 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp b/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp index 7006361b4c..bdd476091a 100644 --- a/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp +++ b/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp @@ -491,16 +491,15 @@ TEST(MatcherCXXMemberCallExpr, On) { EXPECT_TRUE(matches(Snippet2, MatchesX)); // Parens are ignored. + auto Snippet3 = R"cc( + struct Y { + void m(); + }; + Y g(); + void z(Y y) { (g()).m(); } + )cc"; auto MatchesCall = cxxMemberCallExpr(on(callExpr())); - EXPECT_TRUE(matches( - R"cc( - struct Y { - void m(); - }; - Y g(); - void z(Y y) { (g()).m(); } - )cc", - MatchesCall)); + EXPECT_TRUE(matches(Snippet3, MatchesCall)); } TEST(MatcherCXXMemberCallExpr, OnImplicitObjectArgument) { @@ -527,16 +526,15 @@ TEST(MatcherCXXMemberCallExpr, OnImplicitObjectArgument) { EXPECT_TRUE(notMatches(Snippet2, MatchesX)); // Parens are not ignored. + auto Snippet3 = R"cc( + struct Y { + void m(); + }; + Y g(); + void z(Y y) { (g()).m(); } + )cc"; auto MatchesCall = cxxMemberCallExpr(onImplicitObjectArgument(callExpr())); - EXPECT_TRUE(notMatches( - R"cc( - struct Y { - void m(); - }; - Y g(); - void z(Y y) { (g()).m(); } - )cc", - MatchesCall)); + EXPECT_TRUE(notMatches(Snippet3, MatchesCall)); } TEST(Matcher, HasObjectExpr) {