From 64178fe5e9e1fe4f853079cb199dea6235adb36f Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Fri, 22 Mar 2019 13:40:36 +0000 Subject: [PATCH] [AST] OMPStructuredBlockTest: avoid using multiline string literals in macros That is what i have been doing elsewhere in these tests, maybe that's it? Maybe this helps with failing builds: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/17921 http://lab.llvm.org:8011/builders/clang-cmake-aarch64-global-isel/builds/10248 llvm-svn: 356749 --- clang/unittests/AST/OMPStructuredBlockTest.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/clang/unittests/AST/OMPStructuredBlockTest.cpp b/clang/unittests/AST/OMPStructuredBlockTest.cpp index 623bed3..f4a3fad 100644 --- a/clang/unittests/AST/OMPStructuredBlockTest.cpp +++ b/clang/unittests/AST/OMPStructuredBlockTest.cpp @@ -102,11 +102,12 @@ void test() { #pragma omp cancel parallel } })"; - ASSERT_TRUE( - PrintedOMPStmtMatches(Source, OMPInnermostStructuredBlockMatcher(), R"({ + const char *Expected = R"({ #pragma omp cancel parallel } -)")); +)"; + ASSERT_TRUE(PrintedOMPStmtMatches( + Source, OMPInnermostStructuredBlockMatcher(), Expected)); ASSERT_TRUE(PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(), "#pragma omp cancel parallel\n")); } @@ -117,14 +118,15 @@ TEST(OMPStructuredBlock, TestCancellationPoint) { void test() { #pragma omp parallel { -#pragma omp cancellation point parallel + #pragma omp cancellation point parallel } })"; - ASSERT_TRUE( - PrintedOMPStmtMatches(Source, OMPInnermostStructuredBlockMatcher(), R"({ + const char *Expected = R"({ #pragma omp cancellation point parallel } -)")); +)"; + ASSERT_TRUE(PrintedOMPStmtMatches( + Source, OMPInnermostStructuredBlockMatcher(), Expected)); ASSERT_TRUE( PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(), "#pragma omp cancellation point parallel\n")); -- 2.7.4