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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=990ffcb8042af8e83c4c742c3fa0410b8267cb1f;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356749 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/AST/OMPStructuredBlockTest.cpp b/unittests/AST/OMPStructuredBlockTest.cpp index 623bed388c..f4a3fad4a1 100644 --- a/unittests/AST/OMPStructuredBlockTest.cpp +++ b/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"));