From: Roman Lebedev Date: Fri, 22 Mar 2019 13:40:36 +0000 (+0000) Subject: [AST] OMPStructuredBlockTest: avoid using multiline string literals in macros X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64178fe5e9e1fe4f853079cb199dea6235adb36f;p=platform%2Fupstream%2Fllvm.git [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 --- 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"));