summaryrefslogtreecommitdiff
path: root/unittests/ASTMatchers
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2018-08-15 10:39:43 +0000
committerDavid Green <david.green@arm.com>2018-08-15 10:39:43 +0000
commit547357ad290d9997c9888836679b42e741cf2de9 (patch)
treef37465c9f8af3d62ec7799d0aaba839c7ace6202 /unittests/ASTMatchers
parentaf3ecdc44d5e03ee7435d3581f28356b025c3338 (diff)
downloadclang-547357ad290d9997c9888836679b42e741cf2de9.tar.gz
Fix ASTMatchersTraversalTest testcase compile on older compilers
Some versions of gcc, especially when invoked through ccache (-E), can have trouble with raw string literals inside macros. This moves the string out of the macro. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ASTMatchers')
-rw-r--r--unittests/ASTMatchers/ASTMatchersTraversalTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp b/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
index 52ab54467e..713fb5a592 100644
--- a/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
+++ b/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
@@ -1322,7 +1322,7 @@ TEST(IgnoringImplicit, MatchesImplicit) {
}
TEST(IgnoringImplicit, MatchesNestedImplicit) {
- EXPECT_TRUE(matches(R"(
+ StringRef Code = R"(
struct OtherType;
@@ -1348,8 +1348,8 @@ int main()
{
SomeType i = something();
}
-)"
- , varDecl(
+)";
+ EXPECT_TRUE(matches(Code, varDecl(
hasName("i"),
hasInitializer(exprWithCleanups(has(
cxxConstructExpr(has(expr(ignoringImplicit(cxxConstructExpr(