]> granicus.if.org Git - clang/commitdiff
Fix tests to account for new warning "expected ';' at end of declaration list". ...
authorCarl Norum <carl.norum@apple.com>
Mon, 7 Mar 2011 22:57:45 +0000 (22:57 +0000)
committerCarl Norum <carl.norum@apple.com>
Mon, 7 Mar 2011 22:57:45 +0000 (22:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127188 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/string.c
test/Sema/align-x86.c
test/Sema/anonymous-struct-union.c
test/Sema/arm-layout.c
test/Sema/const-eval.c
test/Sema/missing-field-initializers.c
test/Sema/warn-gnu-designators.c
test/SemaObjC/sizeof-interface.m

index 94bc851f22713d881e47c93bb657e3fad3f2fc70..33d409b8472d46ddaff0c2322cf83bb74dd04066 100644 (file)
@@ -68,7 +68,7 @@ label:
 }
 
 void strlen_subregion() {
-  struct two_strings { char a[2], b[2] };
+  struct two_strings { char a[2], b[2]; };
   extern void use_two_strings(struct two_strings *);
 
   struct two_strings z;
@@ -200,7 +200,7 @@ label:
 }
 
 void strnlen_subregion() {
-  struct two_stringsn { char a[2], b[2] };
+  struct two_stringsn { char a[2], b[2]; };
   extern void use_two_stringsn(struct two_stringsn *);
 
   struct two_stringsn z;
index c9a63989ecbc28fb8fcf2a97ba4c2d642bda4c76..0c84384305a75d4e1dea97ddfa37a741e11c4550 100644 (file)
@@ -14,7 +14,7 @@ short chk1[__alignof__(g3) == 8 ? 1 : -1];
 short chk2[__alignof__(_Complex double) == 8 ? 1 : -1];
 
 // PR6362
-struct __attribute__((packed)) {unsigned int a} g4;
+struct __attribute__((packed)) {unsigned int a;} g4;
 short chk1[__alignof__(g4) == 1 ? 1 : -1];
 short chk2[__alignof__(g4.a) == 1 ? 1 : -1];
 
index d9e08397f2d38923b522d369ae7e6154ee892863..d88abc3c3b9e9385ceb6a6c72ed5ba5e4fa17cee 100644 (file)
@@ -94,7 +94,7 @@ struct {}; // expected-warning{{declaration does not declare anything}}
 struct s2 {
   union {
     int a;
-  }
+  } // expected-warning{{expected ';' at end of declaration list}}
 }; // expected-error{{expected member name or ';' after declaration specifiers}}
 
 // Make sure we don't a.k.a. anonymous structs.
index 424868510428cc0da4c61850bfba98ebff364d44..d017fdb8aa07df5d36f181d83f3fe4739d69f6fd 100644 (file)
@@ -42,7 +42,7 @@ check(s3_offset_0, __builtin_offsetof(struct s3, field0) == 0);
 check(s3_offset_1, __builtin_offsetof(struct s3, field2) == 7);
 
 struct s4 {
-  int field0 : 4
+  int field0 : 4;
 };
 #ifdef __ARM_EABI__
 check(s4_size, sizeof(struct s4) == 4);
index aa0cee5da5b34b303d9e871d9e6b4bb424a6d9e1..56c429c58c2ab2e390ddae4a6284aa2766349adf 100644 (file)
@@ -58,7 +58,7 @@ EVAL_EXPR(29, (_Complex int)1 ? 1 : -1)
 
 
 // PR4027 + rdar://6808859
-struct a { int x, y };
+struct a { int x, y; };
 static struct a V2 = (struct a)(struct a){ 1, 2};
 static const struct a V1 = (struct a){ 1, 2};
 
index 6aa48ba9e419d28f0cbfdc2f844f25c9a75a9e9e..90e0e2a345b08c6fd6ba0c21974b90573776df92 100644 (file)
@@ -46,7 +46,7 @@ struct Three data[] = {
   { { .two = { 1.0f, 2.0f } } } // expected-warning {{missing field 'e' initializer}}
 };
 
-struct { int:5; int a; int:5; int b; int:5 } noNamedImplicit[] = {
+struct { int:5; int a; int:5; int b; int:5; } noNamedImplicit[] = {
   { 1, 2 },
   { 1 } // expected-warning {{missing field 'b' initializer}}
 };
index d5ac8cfe5539438353cebfada5d68f42b5c922b0..bdb3374288df01ccdc094230875de68a0a80e70f 100644 (file)
@@ -1,2 +1,2 @@
 // RUN: %clang_cc1 -Wno-gnu-designator -verify %s
-struct { int x, y, z[12] } value = { x:17, .z [3 ... 5] = 7 };
+struct { int x, y, z[12]; } value = { x:17, .z [3 ... 5] = 7 };
index 9d85f1f53fccda04407c878fcd491f8e96136ba5..3fe39645fddb04cd529869a67efb33e704b19c6b 100644 (file)
@@ -43,7 +43,7 @@ int g2[ sizeof(I0)   // expected-error {{invalid application of 'sizeof' to inte
 @synthesize p0 = _p0;
 @end
 
-typedef struct { @defs(I1) } I1_defs; // expected-error {{invalid application of @defs in non-fragile ABI}}
+typedef struct { @defs(I1); } I1_defs; // expected-error {{invalid application of @defs in non-fragile ABI}}
 
 // FIXME: This is currently broken due to the way the record layout we
 // create is tied to whether we have seen synthesized properties. Ugh.