Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c
index b7542b3..c78fd29 100644
--- a/test/Sema/array-init.c
+++ b/test/Sema/array-init.c
@@ -144,12 +144,11 @@
static char const yy[5] = "test";
static char const zz[3] = "test"; // expected-warning{{initializer-string for char array is too long}}
-void charArrays()
-{
- static char const test[] = "test";
- int test_sizecheck[(sizeof(test) / sizeof(char)) == 5? 1 : -1];
- static char const test2[] = { "weird stuff" };
- static char const test3[] = { "test", "excess stuff" }; // expected-warning{{excess elements in char array initializer}}
+void charArrays() {
+ static char const test[] = "test";
+ int test_sizecheck[(sizeof(test) / sizeof(char)) == 5? 1 : -1];
+ static char const test2[] = { "weird stuff" };
+ static char const test3[] = { "test", "excess stuff" }; // expected-warning{{excess elements in char array initializer}}
char* cp[] = { "Hello" };
@@ -230,15 +229,15 @@
// ptrs are constant
struct soft_segment_descriptor {
- long ssd_base;
+ long ssd_base;
};
static int dblfault_tss;
union uniao { int ola; } xpto[1];
struct soft_segment_descriptor gdt_segs[] = {
- {(long) &dblfault_tss},
- { (long)xpto},
+ {(long) &dblfault_tss},
+ { (long)xpto},
};
static void sppp_ipv6cp_up();
diff --git a/test/Sema/attr-deprecated.c b/test/Sema/attr-deprecated.c
index 6597bad..e15381e 100644
--- a/test/Sema/attr-deprecated.c
+++ b/test/Sema/attr-deprecated.c
@@ -21,7 +21,7 @@
// test if attributes propagate to variables
extern int var;
int w() {
- return var; // expected-warning {{'var' is deprecated}}
+ return var; // expected-warning {{'var' is deprecated}}
}
int old_fn() __attribute__ ((deprecated));
diff --git a/test/Sema/block-call.c b/test/Sema/block-call.c
index c42b642..893a8f6 100644
--- a/test/Sema/block-call.c
+++ b/test/Sema/block-call.c
@@ -5,51 +5,47 @@
int (^II) (int);
int main() {
int (*FPL) (int) = FP; // C doesn't consider this an error.
-
+
// For Blocks, the ASTContext::typesAreBlockCompatible() makes sure this is an error.
int (^PFR) (int) = IFP; // OK
- PFR = II; // OK
+ PFR = II; // OK
- int (^IFP) () = PFR; // OK
+ int (^IFP) () = PFR; // OK
- const int (^CIC) () = IFP; // expected-error {{incompatible block pointer types initializing 'int (^)()', expected 'int const (^)()'}}
+ const int (^CIC) () = IFP; // expected-error {{incompatible block pointer types initializing 'int (^)()', expected 'int const (^)()'}}
+ const int (^CICC) () = CIC;
- const int (^CICC) () = CIC;
+ int * const (^IPCC) () = 0;
- int * const (^IPCC) () = 0;
+ int * const (^IPCC1) () = IPCC;
- int * const (^IPCC1) () = IPCC;
+ int * (^IPCC2) () = IPCC; // expected-error {{incompatible block pointer types initializing 'int *const (^)()', expected 'int *(^)()'}}
- int * (^IPCC2) () = IPCC; // expected-error {{incompatible block pointer types initializing 'int *const (^)()', expected 'int *(^)()'}}
+ int (^IPCC3) (const int) = PFR;
- int (^IPCC3) (const int) = PFR;
+ int (^IPCC4) (int, char (^CArg) (double));
+ int (^IPCC5) (int, char (^CArg) (double)) = IPCC4;
- int (^IPCC4) (int, char (^CArg) (double));
+ int (^IPCC6) (int, char (^CArg) (float)) = IPCC4; // expected-error {{incompatible block pointer types initializing 'int (^)(int, char (^)(double))', expected 'int (^)(int, char (^)(float))'}}
-
- int (^IPCC5) (int, char (^CArg) (double)) = IPCC4;
-
- int (^IPCC6) (int, char (^CArg) (float)) = IPCC4; // expected-error {{incompatible block pointer types initializing 'int (^)(int, char (^)(double))', expected 'int (^)(int, char (^)(float))'}}
-
- IPCC2 = 0;
- IPCC2 = 1; // expected-error {{invalid conversion assigning integer 'int', expected block pointer 'int *(^)()'}}
- int (^x)() = 0;
- int (^y)() = 3; // expected-error {{invalid conversion initializing integer 'int', expected block pointer 'int (^)()'}}
- int a = 1;
- int (^z)() = a+4; // expected-error {{invalid conversion initializing integer 'int', expected block pointer 'int (^)()'}}
+ IPCC2 = 0;
+ IPCC2 = 1; // expected-error {{invalid conversion assigning integer 'int', expected block pointer 'int *(^)()'}}
+ int (^x)() = 0;
+ int (^y)() = 3; // expected-error {{invalid conversion initializing integer 'int', expected block pointer 'int (^)()'}}
+ int a = 1;
+ int (^z)() = a+4; // expected-error {{invalid conversion initializing integer 'int', expected block pointer 'int (^)()'}}
}
int blah() {
- int (^IFP) (float);
- char (^PCP)(double, double, char);
+ int (^IFP) (float);
+ char (^PCP)(double, double, char);
- IFP(1.0);
- IFP (1.0, 2.0); // expected-error {{too many arguments to block call}}
+ IFP(1.0);
+ IFP (1.0, 2.0); // expected-error {{too many arguments to block call}}
- char ch = PCP(1.0, 2.0, 'a');
- return PCP(1.0, 2.0); // expected-error {{too few arguments to block}}
+ char ch = PCP(1.0, 2.0, 'a');
+ return PCP(1.0, 2.0); // expected-error {{too few arguments to block}}
}
-
diff --git a/test/Sema/block-explicit-return-type.c b/test/Sema/block-explicit-return-type.c
index c7b26b3..f0a033d 100644
--- a/test/Sema/block-explicit-return-type.c
+++ b/test/Sema/block-explicit-return-type.c
@@ -19,42 +19,39 @@
typedef double (^myblock)(int);
double test(myblock I);
-int main()
-{
- __block int x = 1;
- __block int y = 2;
+int main() {
+ __block int x = 1;
+ __block int y = 2;
- (void)^void *{ return 0; };
+ (void)^void *{ return 0; };
- (void)^float(float y){ return y; };
+ (void)^float(float y){ return y; };
- (void)^double (float y, double d)
- {
- if (y)
- return d;
- else
- return y;
- };
+ (void)^double (float y, double d) {
+ if (y)
+ return d;
+ else
+ return y;
+ };
- const char * (^chb) (int flag, const char *arg, char *arg1) = ^ const char * (int flag, const char *arg, char *arg1) {
- if (flag)
- return 0;
- if (flag == 1)
- return arg;
- else if (flag == 2)
- return "";
- return arg1;
- };
+ const char * (^chb) (int flag, const char *arg, char *arg1) = ^ const char * (int flag, const char *arg, char *arg1) {
+ if (flag)
+ return 0;
+ if (flag == 1)
+ return arg;
+ else if (flag == 2)
+ return "";
+ return arg1;
+ };
- (void)^PF { return &gf; };
+ (void)^PF { return &gf; };
- some_func(^ NSView * (id whatever) { return [some_object some_method_that_returns_id]; });
+ some_func(^ NSView * (id whatever) { return [some_object some_method_that_returns_id]; });
- double res = test(^(int z){x = y+z; return (double)z; });
+ double res = test(^(int z){x = y+z; return (double)z; });
}
-void func()
-{
+void func() {
completion_block_t X;
completion_block_t (^blockx)(dispatch_item_t) = ^completion_block_t (dispatch_item_t item) {
@@ -66,7 +63,6 @@
};
blockx = blocky;
-
}
diff --git a/test/Sema/block-literal.c b/test/Sema/block-literal.c
index c4aadd5..9f5022d 100644
--- a/test/Sema/block-literal.c
+++ b/test/Sema/block-literal.c
@@ -12,34 +12,34 @@
int takeintint(int (^C)(int)) { return C(4); }
T somefunction() {
- if (^{ })
- nothing();
+ if (^{ })
+ nothing();
- noop = ^{};
+ noop = ^{};
- noop = ^{printf("\nClosure\n"); };
+ noop = ^{printf("\nClosure\n"); };
- I(^{ });
+ I(^{ });
- return ^{printf("\nClosure\n"); };
+ return ^{printf("\nClosure\n"); };
}
void test2() {
- int x = 4;
+ int x = 4;
- takeblock(^{ printf("%d\n", x); });
+ takeblock(^{ printf("%d\n", x); });
while (1) {
- takeblock(^{
- break; // expected-error {{'break' statement not in loop or switch statement}}
- continue; // expected-error {{'continue' statement not in loop statement}}
- while(1) break; // ok
- goto foo; // expected-error {{goto not allowed}}
- });
+ takeblock(^{
+ break; // expected-error {{'break' statement not in loop or switch statement}}
+ continue; // expected-error {{'continue' statement not in loop statement}}
+ while(1) break; // ok
+ goto foo; // expected-error {{goto not allowed}}
+ });
break;
- }
+ }
-foo:
- takeblock(^{ x = 4; }); // expected-error {{variable is not assignable (missing __block type specifier)}}
+ foo:
+ takeblock(^{ x = 4; }); // expected-error {{variable is not assignable (missing __block type specifier)}}
__block y = 7; // expected-warning {{type specifier missing, defaults to 'int'}}
takeblock(^{ y = 8; });
}
@@ -59,11 +59,11 @@
void myfunc3(const int *x);
void test5() {
- int a;
+ int a;
- myfunc(^(int abcd) {
- myfunc3(&a);
- return 1;
+ myfunc(^(int abcd) {
+ myfunc3(&a);
+ return 1;
});
}
diff --git a/test/Sema/block-misc.c b/test/Sema/block-misc.c
index a9a7df6..8661fd8 100644
--- a/test/Sema/block-misc.c
+++ b/test/Sema/block-misc.c
@@ -4,37 +4,37 @@
int (^IFP) ();
int (^II) (int);
int test1() {
- int (^PFR) (int) = 0; // OK
- PFR = II; // OK
+ int (^PFR) (int) = 0; // OK
+ PFR = II; // OK
- if (PFR == II) // OK
+ if (PFR == II) // OK
donotwarn();
- if (PFR == IFP) // OK
+ if (PFR == IFP) // OK
donotwarn();
if (PFR == (int (^) (int))IFP) // OK
donotwarn();
- if (PFR == 0) // OK
+ if (PFR == 0) // OK
donotwarn();
- if (PFR) // OK
+ if (PFR) // OK
donotwarn();
- if (!PFR) // OK
+ if (!PFR) // OK
donotwarn();
- return PFR != IFP; // OK
+ return PFR != IFP; // OK
}
int test2(double (^S)()) {
double (^I)(int) = (void*) S;
- (void*)I = (void *)S; // expected-error {{assignment to cast is illegal, lvalue casts are not supported}}
+ (void*)I = (void *)S; // expected-error {{assignment to cast is illegal, lvalue casts are not supported}}
void *pv = I;
- pv = S;
+ pv = S;
I(1);
@@ -114,7 +114,7 @@
void (^test12f)(void);
void test12() {
- test12f = ^test12f; // expected-error {{type name requires a specifier or qualifier}} expected-error {{expected expression}}
+ test12f = ^test12f; // expected-error {{type name requires a specifier or qualifier}} expected-error {{expected expression}}
}
// rdar://6808730
@@ -144,7 +144,7 @@
void (^test15f)(void);
void test15() {
- foo(^{ return LESS; }); // expected-error {{incompatible block pointer types passing 'int (^)(void)', expected 'long (^)()'}}
+ foo(^{ return LESS; }); // expected-error {{incompatible block pointer types passing 'int (^)(void)', expected 'long (^)()'}}
}
__block int test16i; // expected-error {{__block attribute not allowed, only allowed on local variables}}
diff --git a/test/Sema/block-printf-attribute-1.c b/test/Sema/block-printf-attribute-1.c
index ce30b8e..4941ae7 100644
--- a/test/Sema/block-printf-attribute-1.c
+++ b/test/Sema/block-printf-attribute-1.c
@@ -1,15 +1,12 @@
// RUN: clang-cc %s -fsyntax-only -verify -fblocks
-int main()
-{
- void (^b) (int arg, const char * format, ...) __attribute__ ((__format__ (__printf__, 1, 3))) = // expected-error {{format argument not a string type}}
- ^ __attribute__ ((__format__ (__printf__, 1, 3))) (int arg, const char * format, ...) {}; // expected-error {{format argument not a string type}}
+int main() {
+ void (^b) (int arg, const char * format, ...) __attribute__ ((__format__ (__printf__, 1, 3))) = // expected-error {{format argument not a string type}}
+ ^ __attribute__ ((__format__ (__printf__, 1, 3))) (int arg, const char * format, ...) {}; // expected-error {{format argument not a string type}}
- void (^z) (int arg, const char * format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) = ^ __attribute__ ((__format__ (__printf__, 2, 3))) (int arg, const char * format, ...) {};
+ void (^z) (int arg, const char * format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) = ^ __attribute__ ((__format__ (__printf__, 2, 3))) (int arg, const char * format, ...) {};
- // FIXME: argument type poking not yet supportted.
- z(1, "%s", 1); /* { dg-warning "format \\'\%s\\' expects type \\'char \\*\\'\, but argument 3 has type \\'int\\'" } */
- z(1, "%s", "HELLO"); // OK
-
+ // FIXME: argument type poking not yet supportted.
+ z(1, "%s", 1); /* { dg-warning "format \\'\%s\\' expects type \\'char \\*\\'\, but argument 3 has type \\'int\\'" } */
+ z(1, "%s", "HELLO"); // OK
}
-
diff --git a/test/Sema/block-return.c b/test/Sema/block-return.c
index 96dde36..98a7273 100644
--- a/test/Sema/block-return.c
+++ b/test/Sema/block-return.c
@@ -31,7 +31,7 @@
return (float)1.0;
else
if (2)
- return (double)2.0;
+ return (double)2.0;
return 1;
};
char *(^B)(void) = ^{
@@ -66,7 +66,7 @@
Boolean (*value_equal)(uintptr_t, uintptr_t) = 0;
cb.isEqual = ^(const CFBasicHash *table, uintptr_t stack_value_or_key1, uintptr_t stack_value_or_key2, Boolean is_key) {
- return (Boolean)(uintptr_t)INVOKE_CALLBACK2(value_equal, (uintptr_t)stack_value_or_key1, (uintptr_t)stack_value_or_key2);
+ return (Boolean)(uintptr_t)INVOKE_CALLBACK2(value_equal, (uintptr_t)stack_value_or_key1, (uintptr_t)stack_value_or_key2);
};
}
diff --git a/test/Sema/block-sentinel-attribute.c b/test/Sema/block-sentinel-attribute.c
index a7d4df1..5628a2c 100644
--- a/test/Sema/block-sentinel-attribute.c
+++ b/test/Sema/block-sentinel-attribute.c
@@ -2,24 +2,23 @@
void (^e) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (1,1)));
-int main()
-{
- void (^bbad) (int arg, const char * format) __attribute__ ((__sentinel__)) ; // expected-warning {{sentinel' attribute only supported for variadic blocks}}
- void (^b) (int arg, const char * format, ...) __attribute__ ((__sentinel__)) = // expected-note {{block has been explicitly marked sentinel here}}
- ^ __attribute__ ((__sentinel__)) (int arg, const char * format, ...) {};
- void (^z) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (2))) = ^ __attribute__ ((__sentinel__ (2))) (int arg, const char * format, ...) {}; // expected-note {{block has been explicitly marked sentinel here}}
+int main() {
+ void (^bbad) (int arg, const char * format) __attribute__ ((__sentinel__)) ; // expected-warning {{sentinel' attribute only supported for variadic blocks}}
+ void (^b) (int arg, const char * format, ...) __attribute__ ((__sentinel__)) = // expected-note {{block has been explicitly marked sentinel here}}
+ ^ __attribute__ ((__sentinel__)) (int arg, const char * format, ...) {};
+ void (^z) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (2))) = ^ __attribute__ ((__sentinel__ (2))) (int arg, const char * format, ...) {}; // expected-note {{block has been explicitly marked sentinel here}}
- void (^y) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (5))) = ^ __attribute__ ((__sentinel__ (5))) (int arg, const char * format, ...) {}; // expected-note {{block has been explicitly marked sentinel here}}
+ void (^y) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (5))) = ^ __attribute__ ((__sentinel__ (5))) (int arg, const char * format, ...) {}; // expected-note {{block has been explicitly marked sentinel here}}
- b(1, "%s", (void*)0); // OK
- b(1, "%s", 0); // expected-warning {{missing sentinel in block call}}
- z(1, "%s",4 ,1,0); // expected-warning {{missing sentinel in block call}}
- z(1, "%s", (void*)0, 1, 0); // OK
+ b(1, "%s", (void*)0); // OK
+ b(1, "%s", 0); // expected-warning {{missing sentinel in block call}}
+ z(1, "%s",4 ,1,0); // expected-warning {{missing sentinel in block call}}
+ z(1, "%s", (void*)0, 1, 0); // OK
- y(1, "%s", 1,2,3,4,5,6,7); // expected-warning {{missing sentinel in block call}}
+ y(1, "%s", 1,2,3,4,5,6,7); // expected-warning {{missing sentinel in block call}}
- y(1, "%s", (void*)0,3,4,5,6,7); // OK
+ y(1, "%s", (void*)0,3,4,5,6,7); // OK
}
diff --git a/test/Sema/c89-2.c b/test/Sema/c89-2.c
index 3b54640..50c5f4e 100644
--- a/test/Sema/c89-2.c
+++ b/test/Sema/c89-2.c
@@ -1,5 +1,5 @@
/* RUN: clang-cc %s -std=c89 -pedantic-errors -verify
*/
-#if 1LL /* expected-error {{long long}} */
+#if 1LL /* expected-error {{long long}} */
#endif
diff --git a/test/Sema/c89.c b/test/Sema/c89.c
index 9bf720b..fc50ebe 100644
--- a/test/Sema/c89.c
+++ b/test/Sema/c89.c
@@ -25,7 +25,7 @@
int A[i]; /* expected-warning {{variable length array}} */
}
-int test4 = 0LL; /* expected-warning {{long long}} */
+int test4 = 0LL; /* expected-warning {{long long}} */
/* PR1999 */
void test5(register);
diff --git a/test/Sema/complex-int.c b/test/Sema/complex-int.c
index 5977b4d..6c66089 100644
--- a/test/Sema/complex-int.c
+++ b/test/Sema/complex-int.c
@@ -44,9 +44,8 @@
// rdar://6097730
void test3(_Complex int *x) {
*x = ~*x;
-}
+}
void test4(_Complex float *x) {
*x = ~*x;
-}
-
+}
diff --git a/test/Sema/conditional.c b/test/Sema/conditional.c
index 1c7486a..9f48c34 100644
--- a/test/Sema/conditional.c
+++ b/test/Sema/conditional.c
@@ -4,12 +4,10 @@
void _efree(void *ptr);
-int _php_stream_free1()
-{
- return (1 ? free(0) : _efree(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
+int _php_stream_free1() {
+ return (1 ? free(0) : _efree(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
}
-int _php_stream_free2()
-{
- return (1 ? _efree(0) : free(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
+int _php_stream_free2() {
+ return (1 ? _efree(0) : free(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
}
diff --git a/test/Sema/darwin-align-cast.c b/test/Sema/darwin-align-cast.c
index 313a9e3..fed8983 100644
--- a/test/Sema/darwin-align-cast.c
+++ b/test/Sema/darwin-align-cast.c
@@ -8,10 +8,10 @@
#if 0
This code below comes from the following system headers:
-sys/socket.h:#define CMSG_SPACE(l) (__DARWIN_ALIGN(sizeof(struct
+sys/socket.h:#define CMSG_SPACE(l) (__DARWIN_ALIGN(sizeof(struct
cmsghdr)) + __DARWIN_ALIGN(l))
-i386/_param.h:#define __DARWIN_ALIGN(p) ((__darwin_size_t)((char *)(p)
+i386/_param.h:#define __DARWIN_ALIGN(p) ((__darwin_size_t)((char *)(p)
+ __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES)
#endif
diff --git a/test/Sema/floating-point-compare.c b/test/Sema/floating-point-compare.c
index 763a8f4..9888105 100644
--- a/test/Sema/floating-point-compare.c
+++ b/test/Sema/floating-point-compare.c
@@ -13,11 +13,11 @@
}
int f4(float x) {
- return x == 0.0; // no-warning {{comparing}}
+ return x == 0.0; // no-warning {{comparing}}
}
int f5(float x) {
- return x == __builtin_inf(); // no-warning
+ return x == __builtin_inf(); // no-warning
}
int f7(float x) {
diff --git a/test/Sema/function-pointer-sentinel-attribute.c b/test/Sema/function-pointer-sentinel-attribute.c
index 0de02fa..6d3fb17 100644
--- a/test/Sema/function-pointer-sentinel-attribute.c
+++ b/test/Sema/function-pointer-sentinel-attribute.c
@@ -2,22 +2,19 @@
void (*e) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (1,1)));
-int main()
-{
- void (*b) (int arg, const char * format, ...) __attribute__ ((__sentinel__)); // expected-note {{function has been explicitly marked sentinel here}}
- void (*z) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (2))); // expected-note {{function has been explicitly marked sentinel here}}
+int main() {
+ void (*b) (int arg, const char * format, ...) __attribute__ ((__sentinel__)); // expected-note {{function has been explicitly marked sentinel here}}
+ void (*z) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (2))); // expected-note {{function has been explicitly marked sentinel here}}
- void (*y) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (5))); // expected-note {{function has been explicitly marked sentinel here}}
+ void (*y) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (5))); // expected-note {{function has been explicitly marked sentinel here}}
- b(1, "%s", (void*)0); // OK
- b(1, "%s", 0); // expected-warning {{missing sentinel in function call}}
- z(1, "%s",4 ,1,0); // expected-warning {{missing sentinel in function call}}
- z(1, "%s", (void*)0, 1, 0); // OK
+ b(1, "%s", (void*)0); // OK
+ b(1, "%s", 0); // expected-warning {{missing sentinel in function call}}
+ z(1, "%s",4 ,1,0); // expected-warning {{missing sentinel in function call}}
+ z(1, "%s", (void*)0, 1, 0); // OK
- y(1, "%s", 1,2,3,4,5,6,7); // expected-warning {{missing sentinel in function call}}
+ y(1, "%s", 1,2,3,4,5,6,7); // expected-warning {{missing sentinel in function call}}
- y(1, "%s", (void*)0,3,4,5,6,7); // OK
-
+ y(1, "%s", (void*)0,3,4,5,6,7); // OK
}
-
diff --git a/test/Sema/function-sentinel-attr.c b/test/Sema/function-sentinel-attr.c
index 6630479..b33b4a0 100644
--- a/test/Sema/function-sentinel-attr.c
+++ b/test/Sema/function-sentinel-attr.c
@@ -18,7 +18,7 @@
foo1(1, 0) ; // expected-warning {{missing sentinel in function call}}
foo5(1, NULL, 2); // OK
foo5(1,2,NULL, 1); // OK
- foo5(1, NULL, 2, 1); // expected-warning {{missing sentinel in function call}}
+ foo5(1, NULL, 2, 1); // expected-warning {{missing sentinel in function call}}
foo6(1,2,3,4,5,6,7); // expected-warning {{missing sentinel in function call}}
foo6(1,NULL,3,4,5,6,7); // OK
diff --git a/test/Sema/implicit-int.c b/test/Sema/implicit-int.c
index 1a81cc5..5190bdb 100644
--- a/test/Sema/implicit-int.c
+++ b/test/Sema/implicit-int.c
@@ -12,15 +12,15 @@
// PR3702
#define PAD(ms10) { \
- register i; \
+ register i; \
}
-#define ILPAD() PAD((NROW - tt.tt_row) * 10) /* 1 ms per char */
+#define ILPAD() PAD((NROW - tt.tt_row) * 10) /* 1 ms per char */
void
h19_insline(n) // expected-warning {{parameter 'n' was not declared, defaulting to type 'int'}}
{
- ILPAD(); // expected-warning {{type specifier missing, defaults to 'int'}}
+ ILPAD(); // expected-warning {{type specifier missing, defaults to 'int'}}
}
struct foo {
diff --git a/test/Sema/predefined-function.c b/test/Sema/predefined-function.c
index e8ccb36..c8d17f0 100644
--- a/test/Sema/predefined-function.c
+++ b/test/Sema/predefined-function.c
@@ -8,31 +8,30 @@
int b(int c) {return 1;}
int foo();
-int foo()
-{
- int eli(int (int)); // expected-error {{conflicting types for 'eli'}}
- eli(b); // expected-error{{incompatible type passing}}
- return 0;
+int foo() {
+ int eli(int (int)); // expected-error {{conflicting types for 'eli'}}
+ eli(b); // expected-error{{incompatible type passing}}
+ return 0;
}
int bar();
int bar(int i) // expected-note {{previous definition is here}}
{
- return 0;
+ return 0;
}
int bar() // expected-error {{redefinition of 'bar'}}
{
- return 0;
+ return 0;
}
int foobar(int); // note {{previous declaration is here}}
int foobar() // error {{conflicting types for 'foobar'}}
{
- return 0;
+ return 0;
}
int wibble(); // expected-note {{previous declaration is here}}
float wibble() // expected-error {{conflicting types for 'wibble'}}
{
- return 0.0f;
+ return 0.0f;
}
diff --git a/test/Sema/static-init.c b/test/Sema/static-init.c
index cd49556..510f3ab 100644
--- a/test/Sema/static-init.c
+++ b/test/Sema/static-init.c
@@ -11,11 +11,11 @@
union bar {
- int i;
+ int i;
};
struct foo {
- unsigned ptr;
+ unsigned ptr;
};
union bar u[1];
diff --git a/test/Sema/struct-decl.c b/test/Sema/struct-decl.c
index 2c0945f..a5a299b 100644
--- a/test/Sema/struct-decl.c
+++ b/test/Sema/struct-decl.c
@@ -1,26 +1,26 @@
// RUN: clang-cc -fsyntax-only -verify %s
// PR3459
struct bar {
- char n[1];
+ char n[1];
};
struct foo {
- char name[(int)&((struct bar *)0)->n];
- char name2[(int)&((struct bar *)0)->n - 1]; //expected-error{{array size is negative}}
+ char name[(int)&((struct bar *)0)->n];
+ char name2[(int)&((struct bar *)0)->n - 1]; //expected-error{{array size is negative}}
};
// PR3430
struct s {
- struct st {
- int v;
- } *ts;
+ struct st {
+ int v;
+ } *ts;
};
struct st;
int foo() {
- struct st *f;
- return f->v + f[0].v;
+ struct st *f;
+ return f->v + f[0].v;
}
// PR3642, PR3671
@@ -29,8 +29,8 @@
char tag_data[];
};
struct datatag {
- struct pppoe_tag hdr; //expected-warning{{field 'hdr' with variable sized type 'struct pppoe_tag' not at the end of a struct or class is a GNU extension}}
- char data;
+ struct pppoe_tag hdr; //expected-warning{{field 'hdr' with variable sized type 'struct pppoe_tag' not at the end of a struct or class is a GNU extension}}
+ char data;
};
diff --git a/test/Sema/transparent-union-pointer.c b/test/Sema/transparent-union-pointer.c
index ea761f1..a58bd42 100644
--- a/test/Sema/transparent-union-pointer.c
+++ b/test/Sema/transparent-union-pointer.c
@@ -1,14 +1,14 @@
// RUN: clang-cc %s -fsyntax-only -verify
typedef union {
- union wait *__uptr;
- int *__iptr;
+ union wait *__uptr;
+ int *__iptr;
} __WAIT_STATUS __attribute__ ((__transparent_union__));
extern int wait (__WAIT_STATUS __stat_loc);
void fastcgi_cleanup() {
- int status = 0;
- wait(&status);
+ int status = 0;
+ wait(&status);
}