[PATCH] D104295: removes redundant test

Fred Grim via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 15 06:39:46 PDT 2021


feg208 created this revision.
feg208 added reviewers: MyDeveloperDay, HazardyKnusperkeks, vitalybuka.
feg208 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This lit test is causing intermittent failures on buildbots. It isn't testing anything
the unittests don't.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104295

Files:
  clang/test/Format/struct-array-initializer.cpp


Index: clang/test/Format/struct-array-initializer.cpp
===================================================================
--- clang/test/Format/struct-array-initializer.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// RUN: grep -Ev "// *[A-Z-]+:" %s \
-// RUN:   | clang-format -style="{BasedOnStyle: LLVM, AlignArrayOfStructures: Right}" %s \
-// RUN:   | FileCheck -strict-whitespace -check-prefix=CHECK1 %s
-// RUN: grep -Ev "// *[A-Z-]+:" %s \
-// RUN:   | clang-format -style="{BasedOnStyle: LLVM, AlignArrayOfStructures: Left}" %s \
-// RUN:   | FileCheck -strict-whitespace -check-prefix=CHECK2 %s
-struct test {
-  int a;
-  int b;
-  const char *c;
-};
-
-struct toast {
-  int a;
-  const char *b;
-  int c;
-  float d;
-};
-
-void f() {
-  struct test demo[] = {{56, 23, "hello"}, {-1, 93463, "world"}, {7, 5, "!!"}};
-  // CHECK1: {{^[[:space:]]{2}struct test demo\[\] = \{$}}
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{56,    23, "hello"},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{-1, 93463, "world"},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{ 7,     5,    "!!"}
-  // CHECK1-NEXT: {{^[[:space:]]{2}\};$}}
-}
-
-void g() {
-  struct toast demo[] = {
-      {56, "hello world I have some things to say", 30, 4.2},
-      {93463, "those things are really comments", 1, 3.1},
-      {7, "about a wide range of topics", 789, .112233}};
-  // CHECK1: {{^[[:space:]]{2}struct toast demo\[\] = \{$}}
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{   56, "hello world I have some things to say",  30,     4.2},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{93463,      "those things are really comments",   1,     3.1},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{    7,          "about a wide range of topics", 789, .112233}
-  // CHECK1-NEXT: {{^[[:space:]]{2}\};$}}
-}
-
-void h() {
-  struct test demo[] = {{56, 23, "hello"}, {-1, 93463, "world"}, {7, 5, "!!"}};
-  // CHECK2: {{^[[:space:]]{2}struct test demo\[\] = \{$}}
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{56, 23,    "hello"},
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{-1, 93463, "world"},
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{7,  5,     "!!"   }
-  // CHECK2-NEXT: {{^[[:space:]]{2}\};$}}
-}
-
-void i() {
-  struct toast demo[] = {
-      {56, "hello world I have some things to say", 30, 4.2},
-      {93463, "those things are really comments", 1, 3.1},
-      {7, "about a wide range of topics", 789, .112233}};
-  // CHECK2: {{^[[:space:]]{2}struct toast demo\[\] = \{$}}
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{56,    "hello world I have some things to say", 30,  4.2    },
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{93463, "those things are really comments",      1,   3.1    },
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{7,     "about a wide range of topics",          789, .112233}
-  // CHECK2-NEXT: {{^[[:space:]]{2}\};$}}
-}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104295.352125.patch
Type: text/x-patch
Size: 2766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210615/26020833/attachment.bin>


More information about the cfe-commits mailing list