summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/test/Parser/CompoundStmtScope.c2
-rw-r--r--clang/test/Parser/MicrosoftExtensions.c2
-rw-r--r--clang/test/Parser/argument_redef.c2
-rw-r--r--clang/test/Parser/bad-control.c4
-rw-r--r--clang/test/Parser/declarators.c10
-rw-r--r--clang/test/Parser/implicit-casts.c1
-rw-r--r--clang/test/Parser/objc-messaging-neg-1.m9
-rw-r--r--clang/test/Parser/recovery.c12
-rw-r--r--clang/test/Parser/statements.c8
-rw-r--r--clang/test/Rewriter/id-test-3.m2
-rw-r--r--clang/test/Rewriter/method-encoding-1.m4
-rw-r--r--clang/test/Rewriter/rewrite-foreach-4.m2
-rw-r--r--clang/test/Rewriter/rewrite-foreach-5.m2
-rw-r--r--clang/test/Sema/arg-scope-c99.c2
-rw-r--r--clang/test/Sema/arg-scope.c2
-rw-r--r--clang/test/Sema/array-constraint.c2
-rw-r--r--clang/test/Sema/array-init.c6
-rw-r--r--clang/test/Sema/attr-weak.c2
-rw-r--r--clang/test/Sema/block-misc.c2
-rw-r--r--clang/test/Sema/builtin-prefetch.c2
-rw-r--r--clang/test/Sema/builtins.c2
-rw-r--r--clang/test/Sema/c89.c2
-rw-r--r--clang/test/Sema/darwin-align-cast.c1
-rw-r--r--clang/test/Sema/decl-type-merging.c10
-rw-r--r--clang/test/Sema/heinous-extensions-on.c13
-rw-r--r--clang/test/Sema/implicit-int.c1
-rw-r--r--clang/test/Sema/redefinition.c4
-rw-r--r--clang/test/Sema/type-spec-struct-union.c2
-rw-r--r--clang/test/Sema/va_arg_x86_64.c9
-rw-r--r--clang/test/SemaCXX/abstract.cpp2
-rw-r--r--clang/test/SemaCXX/warn-for-var-in-else.cpp1
-rw-r--r--clang/test/SemaObjC/access-property-getter.m1
-rw-r--r--clang/test/SemaObjC/category-method-lookup-2.m1
-rw-r--r--clang/test/SemaObjC/compatible-protocol-qualified-types.m1
-rw-r--r--clang/test/SemaObjC/comptypes-a.m1
-rw-r--r--clang/test/SemaObjC/interface-scope-2.m2
-rw-r--r--clang/test/SemaObjC/method-arg-decay.m1
-rw-r--r--clang/test/SemaObjC/method-conflict.m4
-rw-r--r--clang/test/SemaObjC/method-encoding-2.m4
-rw-r--r--clang/test/SemaObjC/method-lookup-2.m5
-rw-r--r--clang/test/SemaObjC/method-lookup.m1
-rw-r--r--clang/test/SemaObjC/method-typecheck-1.m11
-rw-r--r--clang/test/SemaObjC/no-warn-unimpl-method.m2
-rw-r--r--clang/test/SemaObjC/property-11.m1
-rw-r--r--clang/test/SemaObjC/property-9-impl-method.m3
-rw-r--r--clang/test/SemaObjC/property-method-lookup-impl.m4
-rw-r--r--clang/test/SemaObjC/protocol-implementation-inherited.m2
-rw-r--r--clang/test/SemaObjC/protocol-lookup.m1
-rw-r--r--clang/test/SemaObjC/super-cat-prot.m4
-rw-r--r--clang/test/SemaObjC/super.m1
-rw-r--r--clang/test/SemaObjC/synchronized.m2
-rw-r--r--clang/test/SemaObjC/weak-attr-ivar.m5
-rw-r--r--clang/test/SemaObjCXX/protocol-lookup.mm1
-rw-r--r--clang/test/SemaTemplate/ext-vector-type.cpp2
54 files changed, 101 insertions, 84 deletions
diff --git a/clang/test/Parser/CompoundStmtScope.c b/clang/test/Parser/CompoundStmtScope.c
index 6a404aa3a2c..90e3d24a32f 100644
--- a/clang/test/Parser/CompoundStmtScope.c
+++ b/clang/test/Parser/CompoundStmtScope.c
@@ -1,6 +1,6 @@
// RUN: clang-cc -fsyntax-only -verify %s
-int foo() {
+void foo() {
{
typedef float X;
}
diff --git a/clang/test/Parser/MicrosoftExtensions.c b/clang/test/Parser/MicrosoftExtensions.c
index 6f5622e9393..d794fcfe8b4 100644
--- a/clang/test/Parser/MicrosoftExtensions.c
+++ b/clang/test/Parser/MicrosoftExtensions.c
@@ -11,7 +11,7 @@ void * __ptr64 PtrToPtr64(const void *p)
{
return((void * __ptr64) (unsigned __int64) (ULONG_PTR)p );
}
-__forceinline InterlockedBitTestAndSet (long *Base, long Bit) // expected-warning {{type specifier missing, defaults to 'int'}}
+void __forceinline InterlockedBitTestAndSet (long *Base, long Bit)
{
__asm {
mov eax, Bit
diff --git a/clang/test/Parser/argument_redef.c b/clang/test/Parser/argument_redef.c
index 1a43178a40c..fd22c465e5c 100644
--- a/clang/test/Parser/argument_redef.c
+++ b/clang/test/Parser/argument_redef.c
@@ -1,6 +1,6 @@
/* RUN: clang-cc -fsyntax-only -verify %s
*/
-int foo(int A) { /* expected-note {{previous definition is here}} */
+void foo(int A) { /* expected-note {{previous definition is here}} */
int A; /* expected-error {{redefinition of 'A'}} */
}
diff --git a/clang/test/Parser/bad-control.c b/clang/test/Parser/bad-control.c
index 6e59667c354..0bdd179af21 100644
--- a/clang/test/Parser/bad-control.c
+++ b/clang/test/Parser/bad-control.c
@@ -1,9 +1,9 @@
/* RUN: clang-cc -fsyntax-only -verify %s
*/
-int foo() {
+void foo() {
break; /* expected-error {{'break' statement not in loop or switch statement}} */
}
-int foo2() {
+void foo2() {
continue; /* expected-error {{'continue' statement not in loop statement}} */
}
diff --git a/clang/test/Parser/declarators.c b/clang/test/Parser/declarators.c
index 26e8027d107..da8327a1e83 100644
--- a/clang/test/Parser/declarators.c
+++ b/clang/test/Parser/declarators.c
@@ -18,7 +18,7 @@ int *A;
struct str;
-int test2(int *P, int A) {
+void test2(int *P, int A) {
struct str;
// Hard case for array decl, not Array[*].
@@ -26,11 +26,11 @@ int test2(int *P, int A) {
}
typedef int atype;
-int test3(x,
- atype /* expected-error {{unexpected type name 'atype': expected identifier}} */
- ) int x, atype; {}
+void test3(x,
+ atype /* expected-error {{unexpected type name 'atype': expected identifier}} */
+ ) int x, atype; {}
-int test4(x, x) int x; {} /* expected-error {{redefinition of parameter 'x'}} */
+void test4(x, x) int x; {} /* expected-error {{redefinition of parameter 'x'}} */
// PR3031
diff --git a/clang/test/Parser/implicit-casts.c b/clang/test/Parser/implicit-casts.c
index e7d20980da4..3e8f599047c 100644
--- a/clang/test/Parser/implicit-casts.c
+++ b/clang/test/Parser/implicit-casts.c
@@ -15,6 +15,7 @@ void test2() {
int test3() {
int a[2];
a[0] = test3; // expected-warning{{incompatible pointer to integer conversion assigning 'int ()', expected 'int'}}
+ return 0;
}
short x; void test4(char c) { x += c; }
int y; void test5(char c) { y += c; }
diff --git a/clang/test/Parser/objc-messaging-neg-1.m b/clang/test/Parser/objc-messaging-neg-1.m
index a1ec116fb7b..0344566aa87 100644
--- a/clang/test/Parser/objc-messaging-neg-1.m
+++ b/clang/test/Parser/objc-messaging-neg-1.m
@@ -1,7 +1,6 @@
// RUN: clang-cc -fsyntax-only -verify %s
-int main()
- {
- id a;
- [a bla:0 6:7]; // expected-error {{expected ']'}}
- }
+int main() {
+ id a;
+ [a bla:0 6:7]; // expected-error {{expected ']'}}
+}
diff --git a/clang/test/Parser/recovery.c b/clang/test/Parser/recovery.c
index 89eac564a32..43d3e2d8a69 100644
--- a/clang/test/Parser/recovery.c
+++ b/clang/test/Parser/recovery.c
@@ -8,10 +8,10 @@ float test2241[2] = {
// Testcase derived from PR2692
-static char *f (char * (*g) (char **, int), char **p, ...) {
- char *s;
- va_list v; // expected-error {{identifier}}
- s = g (p, __builtin_va_arg(v, int)); // expected-error {{identifier}}
+static void f (char * (*g) (char **, int), char **p, ...) {
+ char *s;
+ va_list v; // expected-error {{identifier}}
+ s = g (p, __builtin_va_arg(v, int)); // expected-error {{identifier}}
}
@@ -20,7 +20,7 @@ static char *f (char * (*g) (char **, int), char **p, ...) {
// rdar://6094870
-int test(int a) {
+void test(int a) {
struct { int i; } x;
if (x.hello) // expected-error {{no member named 'hello'}}
@@ -61,7 +61,7 @@ struct S A = {
};
// rdar://6248081
-int test6248081() {
+void test6248081() {
[10] // expected-error {{expected expression}}
}
diff --git a/clang/test/Parser/statements.c b/clang/test/Parser/statements.c
index b95c23fb28b..a55b2c23f6c 100644
--- a/clang/test/Parser/statements.c
+++ b/clang/test/Parser/statements.c
@@ -1,10 +1,10 @@
// RUN: clang-cc -fsyntax-only -verify %s
-int test1() {
+void test1() {
{ ; { ;;}} ;;
}
-int test2() {
+void test2() {
if (0) { if (1) {} } else { }
do { } while (0);
@@ -18,7 +18,7 @@ int test2() {
for (int X = 0; 0; 0);
}
-int test3() {
+void test3() {
switch (0) {
case 4:
@@ -30,7 +30,7 @@ int test3() {
}
}
-int test4() {
+void test4() {
if (0); // expected-warning {{if statement has empty body}}
int X; // declaration in a block.
diff --git a/clang/test/Rewriter/id-test-3.m b/clang/test/Rewriter/id-test-3.m
index ad1e76decf8..7e4cc51d735 100644
--- a/clang/test/Rewriter/id-test-3.m
+++ b/clang/test/Rewriter/id-test-3.m
@@ -10,5 +10,5 @@
@implementation INTF
- (id<P>)IMeth { return [(id<P>)self Meth: (id<P>)0]; }
-- (id<P>) Meth : (id<P>) Arg {}
+- (id<P>) Meth : (id<P>) Arg { return 0; }
@end
diff --git a/clang/test/Rewriter/method-encoding-1.m b/clang/test/Rewriter/method-encoding-1.m
index 25dccbf7508..05df60291e0 100644
--- a/clang/test/Rewriter/method-encoding-1.m
+++ b/clang/test/Rewriter/method-encoding-1.m
@@ -11,8 +11,8 @@
@end
@implementation Intf
-- (char *) MyMeth : (double) arg1 : (char *[12]) arg2{}
+- (char *) MyMeth : (double) arg1 : (char *[12]) arg2{ return 0; }
- (void) MyProtoMeth : (int **) arg1 : (void*) arg2 {}
+ (void) MyProtoMeth : (int **) arg1 : (void*) arg2 {}
-- (id) address:(void *)location with:(unsigned **)arg2{}
+- (id) address:(void *)location with:(unsigned **)arg2{ return 0; }
@end
diff --git a/clang/test/Rewriter/rewrite-foreach-4.m b/clang/test/Rewriter/rewrite-foreach-4.m
index 774f9a0b75c..5c831ea18b2 100644
--- a/clang/test/Rewriter/rewrite-foreach-4.m
+++ b/clang/test/Rewriter/rewrite-foreach-4.m
@@ -9,7 +9,7 @@
{
return 0;
}
-- (id) allKeys {}
+- (id) allKeys { return 0; }
@end
@interface MyList (BasicTest)
diff --git a/clang/test/Rewriter/rewrite-foreach-5.m b/clang/test/Rewriter/rewrite-foreach-5.m
index d0d12444a3e..d03f6ce84df 100644
--- a/clang/test/Rewriter/rewrite-foreach-5.m
+++ b/clang/test/Rewriter/rewrite-foreach-5.m
@@ -9,7 +9,7 @@
{
return 0;
}
-- (id) allKeys {}
+- (id) allKeys { return 0; }
@end
@interface MyList (BasicTest)
diff --git a/clang/test/Sema/arg-scope-c99.c b/clang/test/Sema/arg-scope-c99.c
index b5b1c8a812c..1d81410b8d0 100644
--- a/clang/test/Sema/arg-scope-c99.c
+++ b/clang/test/Sema/arg-scope-c99.c
@@ -1,2 +1,2 @@
// RUN: clang-cc -fsyntax-only -std=c99 -verify %s
-int bb(int sz, int ar[sz][sz]) { }
+void bb(int sz, int ar[sz][sz]) { }
diff --git a/clang/test/Sema/arg-scope.c b/clang/test/Sema/arg-scope.c
index c1cc7e112f8..d5e59603cfb 100644
--- a/clang/test/Sema/arg-scope.c
+++ b/clang/test/Sema/arg-scope.c
@@ -1,5 +1,5 @@
// RUN: clang-cc -fsyntax-only -verify %s
-int aa(int b, int x[sizeof b]) {}
+void aa(int b, int x[sizeof b]) {}
void foo(int i, int A[i]) {}
diff --git a/clang/test/Sema/array-constraint.c b/clang/test/Sema/array-constraint.c
index 5a09e20ecbf..6407b5daf56 100644
--- a/clang/test/Sema/array-constraint.c
+++ b/clang/test/Sema/array-constraint.c
@@ -45,7 +45,7 @@ typedef int TA[I]; // expected-error {{variable length array declaration not all
void strFunc(char *);
const char staticAry[] = "test";
-int checkStaticAry() {
+void checkStaticAry() {
strFunc(staticAry); // expected-warning{{passing 'char const [5]' discards qualifiers, expected 'char *'}}
}
diff --git a/clang/test/Sema/array-init.c b/clang/test/Sema/array-init.c
index 50148a83ae1..b7542b301bd 100644
--- a/clang/test/Sema/array-init.c
+++ b/clang/test/Sema/array-init.c
@@ -219,10 +219,10 @@ void varArray() {
}
// PR2151
-int emptyInit() {struct {} x[] = {6};} //expected-warning{{empty struct extension}} expected-error{{initializer for aggregate with no elements}}
+void emptyInit() {struct {} x[] = {6};} //expected-warning{{empty struct extension}} expected-error{{initializer for aggregate with no elements}}
-int noNamedInit() {
-struct {int:5;} x[] = {6}; //expected-error{{initializer for aggregate with no elements}}
+void noNamedInit() {
+ struct {int:5;} x[] = {6}; //expected-error{{initializer for aggregate with no elements}}
}
struct {int a; int:5;} noNamedImplicit[] = {1,2,3};
int noNamedImplicitCheck[sizeof(noNamedImplicit) == 3 * sizeof(*noNamedImplicit) ? 1 : -1];
diff --git a/clang/test/Sema/attr-weak.c b/clang/test/Sema/attr-weak.c
index 4e288673feb..4532cccf98d 100644
--- a/clang/test/Sema/attr-weak.c
+++ b/clang/test/Sema/attr-weak.c
@@ -5,7 +5,7 @@ extern int g1 __attribute__((weak_import));
int g2 __attribute__((weak));
int g3 __attribute__((weak_import)); // expected-warning {{'weak_import' attribute cannot be specified on a definition}}
int __attribute__((weak_import)) g4(void);
-int __attribute__((weak_import)) g5(void) {
+void __attribute__((weak_import)) g5(void) {
}
struct __attribute__((weak)) s0 {}; // expected-warning {{'weak' attribute only applies to variable and function types}}
diff --git a/clang/test/Sema/block-misc.c b/clang/test/Sema/block-misc.c
index 1f1cad44a94..a9a7df61fec 100644
--- a/clang/test/Sema/block-misc.c
+++ b/clang/test/Sema/block-misc.c
@@ -44,7 +44,7 @@ int test2(double (^S)()) {
int^ x; // expected-error {{block pointer to non-function type is invalid}}
int^^ x1; // expected-error {{block pointer to non-function type is invalid}} expected-error {{block pointer to non-function type is invalid}}
-int test3() {
+void test3() {
char *^ y; // expected-error {{block pointer to non-function type is invalid}}
}
diff --git a/clang/test/Sema/builtin-prefetch.c b/clang/test/Sema/builtin-prefetch.c
index 6b39e75d525..bf28277acb8 100644
--- a/clang/test/Sema/builtin-prefetch.c
+++ b/clang/test/Sema/builtin-prefetch.c
@@ -1,6 +1,6 @@
// RUN: clang-cc -fsyntax-only -verify %s
-int foo() {
+void foo() {
int a;
__builtin_prefetch(&a);
__builtin_prefetch(&a, 1);
diff --git a/clang/test/Sema/builtins.c b/clang/test/Sema/builtins.c
index 78b75624ea2..068f3006f4a 100644
--- a/clang/test/Sema/builtins.c
+++ b/clang/test/Sema/builtins.c
@@ -34,7 +34,7 @@ void test7() {
// atomics.
-unsigned char test9(short v) {
+void test9(short v) {
unsigned i, old;
old = __sync_fetch_and_add(); // expected-error {{too few arguments to function call}}
diff --git a/clang/test/Sema/c89.c b/clang/test/Sema/c89.c
index e7585c31926..9bf720b6a39 100644
--- a/clang/test/Sema/c89.c
+++ b/clang/test/Sema/c89.c
@@ -36,7 +36,7 @@ int *__restrict; /* expected-error {{expected identifier}} */
/* Implicit int, always ok */
-test6() {}
+test6() { return 0; }
/* PR2012 */
test7; /* expected-warning {{declaration specifier missing, defaulting to 'int'}} */
diff --git a/clang/test/Sema/darwin-align-cast.c b/clang/test/Sema/darwin-align-cast.c
index 09808b5af2e..313a9e34109 100644
--- a/clang/test/Sema/darwin-align-cast.c
+++ b/clang/test/Sema/darwin-align-cast.c
@@ -19,5 +19,6 @@ ssize_t sendFileDescriptor(int fd, void *data, size_t nbytes, int sendfd) {
union {
char control[(((__darwin_size_t)((char *)(sizeof(struct cmsghdr)) + (sizeof(__darwin_size_t) - 1)) &~ (sizeof(__darwin_size_t) - 1)) + ((__darwin_size_t)((char *)(sizeof(int)) + (sizeof(__darwin_size_t) - 1)) &~ (sizeof(__darwin_size_t) - 1)))];
} control_un;
+ return 0;
}
diff --git a/clang/test/Sema/decl-type-merging.c b/clang/test/Sema/decl-type-merging.c
index 1b789a142ad..1a8601298e9 100644
--- a/clang/test/Sema/decl-type-merging.c
+++ b/clang/test/Sema/decl-type-merging.c
@@ -6,11 +6,11 @@ int testx[(sizeof(x) == sizeof(int) * 10) ? 1 : -1];
int (*a)(int (*x)[10], int (*y)[]);
int (*a)(int (*x)[], int (*y)[5]);
-int b() {
-int x[10], y[5];
-a(&x, &y);
-a(&y, &y); // expected-warning {{incompatible pointer}}
-a(&x, &x); // expected-warning {{incompatible pointer}}
+void b() {
+ int x[10], y[5];
+ a(&x, &y);
+ a(&y, &y); // expected-warning {{incompatible pointer}}
+ a(&x, &x); // expected-warning {{incompatible pointer}}
}
diff --git a/clang/test/Sema/heinous-extensions-on.c b/clang/test/Sema/heinous-extensions-on.c
index 480b1b41e90..a56f1f6f625 100644
--- a/clang/test/Sema/heinous-extensions-on.c
+++ b/clang/test/Sema/heinous-extensions-on.c
@@ -1,10 +1,9 @@
// RUN: clang-cc %s -verify -fheinous-gnu-extensions
-int foo() {
- int a;
- // PR3788
- asm("nop" : : "m"((int)(a))); // expected-warning {{cast in a inline asm context requiring an l-value}}
- // PR3794
- asm("nop" : "=r"((unsigned)a)); // expected-warning {{cast in a inline asm context requiring an l-value}}
+void foo() {
+ int a;
+ // PR3788
+ asm("nop" : : "m"((int)(a))); // expected-warning {{cast in a inline asm context requiring an l-value}}
+ // PR3794
+ asm("nop" : "=r"((unsigned)a)); // expected-warning {{cast in a inline asm context requiring an l-value}}
}
-
diff --git a/clang/test/Sema/implicit-int.c b/clang/test/Sema/implicit-int.c
index 04b27a8f0ea..9eab953b3fc 100644
--- a/clang/test/Sema/implicit-int.c
+++ b/clang/test/Sema/implicit-int.c
@@ -1,6 +1,7 @@
// RUN: clang-cc -fsyntax-only %s -verify -pedantic
foo() { // expected-warning {{type specifier missing, defaults to 'int'}}
+ return 0;
}
y; // expected-warning {{type specifier missing, defaults to 'int'}}
diff --git a/clang/test/Sema/redefinition.c b/clang/test/Sema/redefinition.c
index 26c90c8e6d4..9339bb935f6 100644
--- a/clang/test/Sema/redefinition.c
+++ b/clang/test/Sema/redefinition.c
@@ -1,7 +1,7 @@
// RUN: clang-cc %s -fsyntax-only -verify
-int f(int a) { } // expected-note {{previous definition is here}}
+int f(int a) { return 0; } // expected-note {{previous definition is here}}
int f(int);
-int f(int a) { } // expected-error {{redefinition of 'f'}}
+int f(int a) { return 0; } // expected-error {{redefinition of 'f'}}
// <rdar://problem/6097326>
int foo(x) {
diff --git a/clang/test/Sema/type-spec-struct-union.c b/clang/test/Sema/type-spec-struct-union.c
index 2b68b787731..003efb14620 100644
--- a/clang/test/Sema/type-spec-struct-union.c
+++ b/clang/test/Sema/type-spec-struct-union.c
@@ -57,7 +57,7 @@ struct bar_baz {
} mode;
int nowrap;
};
-int
+void
wizbiz_quxPoof(z)
z_foop z;
{
diff --git a/clang/test/Sema/va_arg_x86_64.c b/clang/test/Sema/va_arg_x86_64.c
index 680abb714b9..61ac97b7d45 100644
--- a/clang/test/Sema/va_arg_x86_64.c
+++ b/clang/test/Sema/va_arg_x86_64.c
@@ -8,9 +8,8 @@ char* foo(char *fmt, __builtin_va_list ap)
// PR2692
typedef __builtin_va_list va_list;
-static char *f (char * (*g) (char **, int), char **p, ...) {
- char *s;
- va_list v;
- s = g (p, __builtin_va_arg(v, int));
+static void f (char * (*g) (char **, int), char **p, ...) {
+ char *s;
+ va_list v;
+ s = g (p, __builtin_va_arg(v, int));
}
-
diff --git a/clang/test/SemaCXX/abstract.cpp b/clang/test/SemaCXX/abstract.cpp
index dc764da5322..2d466c203d0 100644
--- a/clang/test/SemaCXX/abstract.cpp
+++ b/clang/test/SemaCXX/abstract.cpp
@@ -54,7 +54,7 @@ typedef void (*Func)(C); // expected-error {{parameter type 'C' is an abstract c
void t6(Func);
class F {
- F a() { } // expected-error {{return type 'F' is an abstract class}}
+ F a() { while (1) {} } // expected-error {{return type 'F' is an abstract class}}
class D {
void f(F c); // expected-error {{parameter type 'F' is an abstract class}}
diff --git a/clang/test/SemaCXX/warn-for-var-in-else.cpp b/clang/test/SemaCXX/warn-for-var-in-else.cpp
index 3368da223a4..f73c6068944 100644
--- a/clang/test/SemaCXX/warn-for-var-in-else.cpp
+++ b/clang/test/SemaCXX/warn-for-var-in-else.cpp
@@ -8,6 +8,7 @@ int foo() {
return X;
} else {
do_something(X); // expected-warning{{'X' is always zero in this context}}
+ return 0;
}
}
diff --git a/clang/test/SemaObjC/access-property-getter.m b/clang/test/SemaObjC/access-property-getter.m
index 50a30168890..225d63b0173 100644
--- a/clang/test/SemaObjC/access-property-getter.m
+++ b/clang/test/SemaObjC/access-property-getter.m
@@ -31,5 +31,6 @@
- (id)harvestPredictivelyProcessedOutputFiles
{
_outputStream.release;
+ return 0;
}
@end
diff --git a/clang/test/SemaObjC/category-method-lookup-2.m b/clang/test/SemaObjC/category-method-lookup-2.m
index 76048cc2f74..15da63783fe 100644
--- a/clang/test/SemaObjC/category-method-lookup-2.m
+++ b/clang/test/SemaObjC/category-method-lookup-2.m
@@ -17,6 +17,7 @@ typedef struct objc_class *Class;
- instanceMethod {
[[self class] classMethod];
+ return 0;
}
@end
diff --git a/clang/test/SemaObjC/compatible-protocol-qualified-types.m b/clang/test/SemaObjC/compatible-protocol-qualified-types.m
index 3c27b5f0d3c..71f00542b1c 100644
--- a/clang/test/SemaObjC/compatible-protocol-qualified-types.m
+++ b/clang/test/SemaObjC/compatible-protocol-qualified-types.m
@@ -70,6 +70,7 @@ extern NSString * const XCActiveSelectionLevel;
- (NSTextStorage *)contents {
[_contents setDelegate:self]; // expected-warning {{incompatible type sending 'SKTText *', expected 'id<NSTextStorageDelegate>'}}
+ return 0;
}
@end
diff --git a/clang/test/SemaObjC/comptypes-a.m b/clang/test/SemaObjC/comptypes-a.m
index 936c6dfc5de..5570d56b0b8 100644
--- a/clang/test/SemaObjC/comptypes-a.m
+++ b/clang/test/SemaObjC/comptypes-a.m
@@ -13,6 +13,7 @@ extern NSInteger codeAssistantCaseCompareItems(id a, id b, void *context);
NSInteger codeAssistantCaseCompareItems(id<PBXCompletionItem> a, id<PBXCompletionItem> b, void *context)
{
+ return 0;
}
@interface TedWantsToVerifyObjCDoesTheRightThing
diff --git a/clang/test/SemaObjC/interface-scope-2.m b/clang/test/SemaObjC/interface-scope-2.m
index d054e714f3b..c9025903940 100644
--- a/clang/test/SemaObjC/interface-scope-2.m
+++ b/clang/test/SemaObjC/interface-scope-2.m
@@ -83,6 +83,7 @@ typedef struct __LoreStuffNode {} LoreStuffNode;
- init {
LoreStuffNode *node;
node = &(_historyStuff[1]);
+ return 0;
}
@end
@@ -108,6 +109,7 @@ _nfttFlags;
if (self != ((void *)0)) {
(void)memset(&_nfttFlags, 0, sizeof(struct _OingoBoingoContraptionPeonFlags));
}
+ return 0;
}
@end
diff --git a/clang/test/SemaObjC/method-arg-decay.m b/clang/test/SemaObjC/method-arg-decay.m
index 4b045914c09..7fd07d2ede3 100644
--- a/clang/test/SemaObjC/method-arg-decay.m
+++ b/clang/test/SemaObjC/method-arg-decay.m
@@ -87,6 +87,7 @@ extern NSMutableArray *XCFindPossibleKeyModules(PBXModule *module, BOOL useExpos
PBXModule *obj = [XCFindPossibleKeyModules(pModule, (BOOL)0) objectOfType:type matchingFunction:comparator usingData:data];
}
}
+ return 0;
}
- (BOOL)buffer:(char *)buf containsAnyPrompts:(char *[])prompts
{
diff --git a/clang/test/SemaObjC/method-conflict.m b/clang/test/SemaObjC/method-conflict.m
index 7a9b9f0beee..a4213f6c63c 100644
--- a/clang/test/SemaObjC/method-conflict.m
+++ b/clang/test/SemaObjC/method-conflict.m
@@ -47,7 +47,9 @@ typedef NSUInteger XDSourceLanguage;
+ appendVisibility: (id <XDUMLNamedElement>) element withSpecification: (XDSCDisplaySpecification *) displaySpec to: (NSMutableAttributedString *) attributedString
{
+ return 0;
}
-+ (NSUInteger) compartmentsForClassifier: (id <XDSCClassifier>) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec {
++ (NSUInteger) compartmentsForClassifier: (id <XDSCClassifier>) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec {
+ return 0;
}
@end
diff --git a/clang/test/SemaObjC/method-encoding-2.m b/clang/test/SemaObjC/method-encoding-2.m
index 64a0bc4c323..b3ffdcd0585 100644
--- a/clang/test/SemaObjC/method-encoding-2.m
+++ b/clang/test/SemaObjC/method-encoding-2.m
@@ -7,6 +7,6 @@
@end
@implementation Intf
-- (in out bycopy id) address:(byref inout void *)location with:(out oneway unsigned **)arg2{}
-- (id) another:(void *)location with:(unsigned **)arg2 {}
+- (in out bycopy id) address:(byref inout void *)location with:(out oneway unsigned **)arg2{ return 0; }
+- (id) another:(void *)location with:(unsigned **)arg2 { return 0; }
@end
diff --git a/clang/test/SemaObjC/method-lookup-2.m b/clang/test/SemaObjC/method-lookup-2.m
index dd0bca93644..cca757509ad 100644
--- a/clang/test/SemaObjC/method-lookup-2.m
+++ b/clang/test/SemaObjC/method-lookup-2.m
@@ -35,8 +35,8 @@ extern NSString *const NSWillBecomeMultiThreadedNotification;
@implementation SenTestTool
+ (void) initialize {}
-+(SenTestTool *) sharedInstance {}
--(int) run {}
++(SenTestTool *) sharedInstance { return 0; }
+-(int) run { return 0; }
+(int) run {
return[[self sharedInstance] run];
}
@@ -57,6 +57,7 @@ extern NSString *const NSWillBecomeMultiThreadedNotification;
- whatever {
id obj = [[XX alloc] init];
[[obj class] classMethod];
+ return 0;
}
@end
diff --git a/clang/test/SemaObjC/method-lookup.m b/clang/test/SemaObjC/method-lookup.m
index 917ad6b3ee9..49dc789af78 100644
--- a/clang/test/SemaObjC/method-lookup.m
+++ b/clang/test/SemaObjC/method-lookup.m
@@ -29,6 +29,7 @@ static NSMutableArray * recentCompletions = ((void *)0);
[(id)item setPriority:[item priority] / [PBXCodeAssistant factorForRecentCompletion:[item name]]];
}
}
+ return 0;
}
@end
diff --git a/clang/test/SemaObjC/method-typecheck-1.m b/clang/test/SemaObjC/method-typecheck-1.m
index d110c858a41..a53c4d9f416 100644
--- a/clang/test/SemaObjC/method-typecheck-1.m
+++ b/clang/test/SemaObjC/method-typecheck-1.m
@@ -8,8 +8,8 @@
@implementation A
-(void) setMoo: (float) x {} // expected-warning {{conflicting parameter types in implementation of 'setMoo:': 'int' vs 'float'}}
-- (char) setMoo1: (int) x {} // expected-warning {{conflicting return type in implementation of 'setMoo1:': 'int' vs 'char'}}
-- (int) setOk : (int) x : (double) d {}
+- (char) setMoo1: (int) x { return 0; } // expected-warning {{conflicting return type in implementation of 'setMoo1:': 'int' vs 'char'}}
+- (int) setOk : (int) x : (double) d { return 0; }
@end
@@ -20,7 +20,7 @@
@implementation C
+(float) cMoo: // expected-warning {{conflicting return type in implementation of 'cMoo:': 'void' vs 'float'}}
- (float) x {} // expected-warning {{conflicting parameter types in implementation of 'cMoo:': 'int' vs 'float'}}
+ (float) x { return 0; } // expected-warning {{conflicting parameter types in implementation of 'cMoo:': 'int' vs 'float'}}
@end
@@ -31,7 +31,6 @@
@implementation A(CAT)
-(float) setCat: // expected-warning {{conflicting return type in implementation of 'setCat:': 'void' vs 'float'}}
-(float) x {} // expected-warning {{conflicting parameter types in implementation of 'setCat:': 'int' vs 'float'}}
-+ (int) cCat: (int) x {} // expected-warning {{conflicting return type in implementation of 'cCat:': 'void' vs 'int'}}
+(float) x { return 0; } // expected-warning {{conflicting parameter types in implementation of 'setCat:': 'int' vs 'float'}}
++ (int) cCat: (int) x { return 0; } // expected-warning {{conflicting return type in implementation of 'cCat:': 'void' vs 'int'}}
@end
-
diff --git a/clang/test/SemaObjC/no-warn-unimpl-method.m b/clang/test/SemaObjC/no-warn-unimpl-method.m
index 756c47b2fe8..2fcb06ff5e9 100644
--- a/clang/test/SemaObjC/no-warn-unimpl-method.m
+++ b/clang/test/SemaObjC/no-warn-unimpl-method.m
@@ -38,5 +38,5 @@
- (void)forwardInvocation:(NSInvocation *)anInvocation
{
}
- - (id) init {}
+ - (id) init { return 0; }
@end
diff --git a/clang/test/SemaObjC/property-11.m b/clang/test/SemaObjC/property-11.m
index e8e60914716..bb36c2766e7 100644
--- a/clang/test/SemaObjC/property-11.m
+++ b/clang/test/SemaObjC/property-11.m
@@ -29,6 +29,7 @@
o = x.foo;
[x setFoo:o];
x.foo = o;
+ return 0;
}
@end
diff --git a/clang/test/SemaObjC/property-9-impl-method.m b/clang/test/SemaObjC/property-9-impl-method.m
index c97f3889119..06cb30482c8 100644
--- a/clang/test/SemaObjC/property-9-impl-method.m
+++ b/clang/test/SemaObjC/property-9-impl-method.m
@@ -55,10 +55,11 @@ NSSize minimumSize;
@implementation OrganizerTabView
@dynamic tabHeaderView, headerRect, minimumSize;
--(CGFloat) tabAreaThickness {}
+-(CGFloat) tabAreaThickness { return 0; }
-(NSRectEdge) rectEdgeForTabs {
NSRect dummy, result = {};
NSDivideRect(self.bounds, &result, &dummy, self.tabAreaThickness, self.rectEdgeForTabs);
+ return 0;
}
@end
diff --git a/clang/test/SemaObjC/property-method-lookup-impl.m b/clang/test/SemaObjC/property-method-lookup-impl.m
index ed7e9bcd431..295bba52400 100644
--- a/clang/test/SemaObjC/property-method-lookup-impl.m
+++ b/clang/test/SemaObjC/property-method-lookup-impl.m
@@ -8,9 +8,7 @@
@implementation SSyncCEList
-- (id) list
-{
-}
+- (id) list { return 0; }
@end
@interface SSyncConflictList : SSyncCEList
diff --git a/clang/test/SemaObjC/protocol-implementation-inherited.m b/clang/test/SemaObjC/protocol-implementation-inherited.m
index 1aace211c84..55b92ae6684 100644
--- a/clang/test/SemaObjC/protocol-implementation-inherited.m
+++ b/clang/test/SemaObjC/protocol-implementation-inherited.m
@@ -26,7 +26,7 @@
@end
@implementation B1
--foo {};
+-foo { return 0; };
@end
// Interface conforms to a protocol whose methods are provided by an
diff --git a/clang/test/SemaObjC/protocol-lookup.m b/clang/test/SemaObjC/protocol-lookup.m
index 0f1860d2c88..87655bd9e7a 100644
--- a/clang/test/SemaObjC/protocol-lookup.m
+++ b/clang/test/SemaObjC/protocol-lookup.m
@@ -44,6 +44,7 @@
[_foo release];
[_bar release];
[super dealloc];
+ return 0;
}
@end
diff --git a/clang/test/SemaObjC/super-cat-prot.m b/clang/test/SemaObjC/super-cat-prot.m
index 1ab0752faa3..6ddc31fbb9e 100644
--- a/clang/test/SemaObjC/super-cat-prot.m
+++ b/clang/test/SemaObjC/super-cat-prot.m
@@ -35,14 +35,16 @@ typedef struct _IBInset {} IBInset;
@interface NSView (NSView_IBViewProtocol) <IBViewProtocol> - (NSRect)layoutRect; @end
typedef enum { NSProTextFieldSquareBezel = 0, NSProTextFieldRoundedBezel = 1, NSProTextFieldDisplayBezel = 2 } MKModuleReusePolicy;
@implementation NSProBox(IBAdditions)
--(NSString *)inspectorClassName {}
+-(NSString *)inspectorClassName { return 0; }
-(IBInset)ibShadowInset {
if ([self boxType] == NSBoxSeparator) {
return [super ibShadowInset];
}
+ while (1) {}
}
-(NSSize)minimumFrameSizeFromKnobPosition:(IBKnobPosition)knobPosition {
if ([self boxType] != NSBoxSeparator)
return [super minimumFrameSizeFromKnobPosition:knobPosition];
+ while (1) {}
}
@end
diff --git a/clang/test/SemaObjC/super.m b/clang/test/SemaObjC/super.m
index 9afd4eb983c..83842afb9c3 100644
--- a/clang/test/SemaObjC/super.m
+++ b/clang/test/SemaObjC/super.m
@@ -21,6 +21,7 @@
+ classMethod {
[super cMethod]; // expected-warning{{method '+cMethod' not found (return type defaults to 'id')}}
+ return 0;
}
@end
diff --git a/clang/test/SemaObjC/synchronized.m b/clang/test/SemaObjC/synchronized.m
index 7131265b5bb..01f82c16862 100644
--- a/clang/test/SemaObjC/synchronized.m
+++ b/clang/test/SemaObjC/synchronized.m
@@ -3,7 +3,7 @@
@interface PBXTrackableTaskManager @end
@implementation PBXTrackableTaskManager
-- (id) init {}
+- (id) init { return 0; }
- (void) unregisterTask:(id) task {
@synchronized (self) {
id taskID = [task taskIdentifier]; // expected-warning {{method '-taskIdentifier' not found (return type defaults to 'id')}}
diff --git a/clang/test/SemaObjC/weak-attr-ivar.m b/clang/test/SemaObjC/weak-attr-ivar.m
index 9e0e8cb4b3a..6af96ddb3c8 100644
--- a/clang/test/SemaObjC/weak-attr-ivar.m
+++ b/clang/test/SemaObjC/weak-attr-ivar.m
@@ -45,8 +45,7 @@ typedef enum { Foo_HUH_NONE } FooHUHCode;
}
@property(copy) NSString *author;
- (BOOL) isInteresting;
-@end NSString *FooHUHCodeToString(FooHUHCode HUH) {
-}
+@end NSString *FooHUHCodeToString(FooHUHCode HUH) { return 0; }
@interface FooHUHCodeToStringTransformer: NSValueTransformer {
}
@end @implementation FooPlaypenEntry @synthesize author = _author;
@@ -62,12 +61,14 @@ typedef enum { Foo_HUH_NONE } FooHUHCode;
}
}
}
+ return 0;
}
- (FooHUHCode) HUH {
if (_HUH == Foo_HUH_NONE) {
if (_mostInterestingChild)
return [_mostInterestingChild HUH];
}
+ return 0;
}
@end
diff --git a/clang/test/SemaObjCXX/protocol-lookup.mm b/clang/test/SemaObjCXX/protocol-lookup.mm
index 0f1860d2c88..87655bd9e7a 100644
--- a/clang/test/SemaObjCXX/protocol-lookup.mm
+++ b/clang/test/SemaObjCXX/protocol-lookup.mm
@@ -44,6 +44,7 @@
[_foo release];
[_bar release];
[super dealloc];
+ return 0;
}
@end
diff --git a/clang/test/SemaTemplate/ext-vector-type.cpp b/clang/test/SemaTemplate/ext-vector-type.cpp
index d6c02bb629f..b6aebc102fb 100644
--- a/clang/test/SemaTemplate/ext-vector-type.cpp
+++ b/clang/test/SemaTemplate/ext-vector-type.cpp
@@ -4,7 +4,7 @@ struct make1 {
typedef T __attribute__((ext_vector_type(Length))) type;
};
-int test_make1() {
+void test_make1() {
make1<int, 5>::type x;
x.x = 4;
}
OpenPOWER on IntegriCloud