[AST] OMPStructuredBlockTest: avoid using multiline string literals in macros
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 22 Mar 2019 13:40:36 +0000 (13:40 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 22 Mar 2019 13:40:36 +0000 (13:40 +0000)
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

index 623bed3..f4a3fad 100644 (file)
@@ -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"));