[cfe-commits] r76709 - in /cfe/trunk/test: Parser/ Rewriter/ Sema/ SemaCXX/ SemaObjC/ SemaObjCXX/ SemaTemplate/

Mike Stump mrs at apple.com
Tue Jul 21 17:43:09 PDT 2009


Author: mrs
Date: Tue Jul 21 19:43:08 2009
New Revision: 76709

URL: http://llvm.org/viewvc/llvm-project?rev=76709&view=rev
Log:
Prep for new warning.

Modified:
    cfe/trunk/test/Parser/CompoundStmtScope.c
    cfe/trunk/test/Parser/MicrosoftExtensions.c
    cfe/trunk/test/Parser/argument_redef.c
    cfe/trunk/test/Parser/bad-control.c
    cfe/trunk/test/Parser/declarators.c
    cfe/trunk/test/Parser/implicit-casts.c
    cfe/trunk/test/Parser/objc-messaging-neg-1.m
    cfe/trunk/test/Parser/recovery.c
    cfe/trunk/test/Parser/statements.c
    cfe/trunk/test/Rewriter/id-test-3.m
    cfe/trunk/test/Rewriter/method-encoding-1.m
    cfe/trunk/test/Rewriter/rewrite-foreach-4.m
    cfe/trunk/test/Rewriter/rewrite-foreach-5.m
    cfe/trunk/test/Sema/arg-scope-c99.c
    cfe/trunk/test/Sema/arg-scope.c
    cfe/trunk/test/Sema/array-constraint.c
    cfe/trunk/test/Sema/array-init.c
    cfe/trunk/test/Sema/attr-weak.c
    cfe/trunk/test/Sema/block-misc.c
    cfe/trunk/test/Sema/builtin-prefetch.c
    cfe/trunk/test/Sema/builtins.c
    cfe/trunk/test/Sema/c89.c
    cfe/trunk/test/Sema/darwin-align-cast.c
    cfe/trunk/test/Sema/decl-type-merging.c
    cfe/trunk/test/Sema/heinous-extensions-on.c
    cfe/trunk/test/Sema/implicit-int.c
    cfe/trunk/test/Sema/redefinition.c
    cfe/trunk/test/Sema/type-spec-struct-union.c
    cfe/trunk/test/Sema/va_arg_x86_64.c
    cfe/trunk/test/SemaCXX/abstract.cpp
    cfe/trunk/test/SemaCXX/warn-for-var-in-else.cpp
    cfe/trunk/test/SemaObjC/access-property-getter.m
    cfe/trunk/test/SemaObjC/category-method-lookup-2.m
    cfe/trunk/test/SemaObjC/compatible-protocol-qualified-types.m
    cfe/trunk/test/SemaObjC/comptypes-a.m
    cfe/trunk/test/SemaObjC/interface-scope-2.m
    cfe/trunk/test/SemaObjC/method-arg-decay.m
    cfe/trunk/test/SemaObjC/method-conflict.m
    cfe/trunk/test/SemaObjC/method-encoding-2.m
    cfe/trunk/test/SemaObjC/method-lookup-2.m
    cfe/trunk/test/SemaObjC/method-lookup.m
    cfe/trunk/test/SemaObjC/method-typecheck-1.m
    cfe/trunk/test/SemaObjC/no-warn-unimpl-method.m
    cfe/trunk/test/SemaObjC/property-11.m
    cfe/trunk/test/SemaObjC/property-9-impl-method.m
    cfe/trunk/test/SemaObjC/property-method-lookup-impl.m
    cfe/trunk/test/SemaObjC/protocol-implementation-inherited.m
    cfe/trunk/test/SemaObjC/protocol-lookup.m
    cfe/trunk/test/SemaObjC/super-cat-prot.m
    cfe/trunk/test/SemaObjC/super.m
    cfe/trunk/test/SemaObjC/synchronized.m
    cfe/trunk/test/SemaObjC/weak-attr-ivar.m
    cfe/trunk/test/SemaObjCXX/protocol-lookup.mm
    cfe/trunk/test/SemaTemplate/ext-vector-type.cpp

Modified: cfe/trunk/test/Parser/CompoundStmtScope.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/CompoundStmtScope.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Parser/CompoundStmtScope.c (original)
+++ cfe/trunk/test/Parser/CompoundStmtScope.c Tue Jul 21 19:43:08 2009
@@ -1,6 +1,6 @@
 // RUN: clang-cc -fsyntax-only -verify %s
 
-int foo() {
+void foo() {
   {
     typedef float X;
   }

Modified: cfe/trunk/test/Parser/MicrosoftExtensions.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/MicrosoftExtensions.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Parser/MicrosoftExtensions.c (original)
+++ cfe/trunk/test/Parser/MicrosoftExtensions.c Tue Jul 21 19:43:08 2009
@@ -11,7 +11,7 @@
 {
     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

Modified: cfe/trunk/test/Parser/argument_redef.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/argument_redef.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Parser/argument_redef.c (original)
+++ cfe/trunk/test/Parser/argument_redef.c Tue Jul 21 19:43:08 2009
@@ -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'}} */
 }

Modified: cfe/trunk/test/Parser/bad-control.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/bad-control.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Parser/bad-control.c (original)
+++ cfe/trunk/test/Parser/bad-control.c Tue Jul 21 19:43:08 2009
@@ -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}} */
 }

Modified: cfe/trunk/test/Parser/declarators.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/declarators.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Parser/declarators.c (original)
+++ cfe/trunk/test/Parser/declarators.c Tue Jul 21 19:43:08 2009
@@ -18,7 +18,7 @@
 
 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 @@
 }
 
 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

Modified: cfe/trunk/test/Parser/implicit-casts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/implicit-casts.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Parser/implicit-casts.c (original)
+++ cfe/trunk/test/Parser/implicit-casts.c Tue Jul 21 19:43:08 2009
@@ -15,6 +15,7 @@
 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; }

Modified: cfe/trunk/test/Parser/objc-messaging-neg-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/objc-messaging-neg-1.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Parser/objc-messaging-neg-1.m (original)
+++ cfe/trunk/test/Parser/objc-messaging-neg-1.m Tue Jul 21 19:43:08 2009
@@ -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 ']'}}
+}

Modified: cfe/trunk/test/Parser/recovery.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/recovery.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Parser/recovery.c (original)
+++ cfe/trunk/test/Parser/recovery.c Tue Jul 21 19:43:08 2009
@@ -8,10 +8,10 @@
 
 
 // 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 @@
 
 
 // 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 @@
 };
 
 // rdar://6248081
-int test6248081() { 
+void test6248081() { 
   [10]  // expected-error {{expected expression}}
 }
 

Modified: cfe/trunk/test/Parser/statements.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/statements.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Parser/statements.c (original)
+++ cfe/trunk/test/Parser/statements.c Tue Jul 21 19:43:08 2009
@@ -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 @@
   for (int X = 0; 0; 0);
 }
 
-int test3() {
+void test3() {
     switch (0) {
     
     case 4:
@@ -30,7 +30,7 @@
   }
 }
 
-int test4() {
+void test4() {
   if (0);  // expected-warning {{if statement has empty body}}
   
   int X;  // declaration in a block.

Modified: cfe/trunk/test/Rewriter/id-test-3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/id-test-3.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Rewriter/id-test-3.m (original)
+++ cfe/trunk/test/Rewriter/id-test-3.m Tue Jul 21 19:43:08 2009
@@ -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

Modified: cfe/trunk/test/Rewriter/method-encoding-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/method-encoding-1.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Rewriter/method-encoding-1.m (original)
+++ cfe/trunk/test/Rewriter/method-encoding-1.m Tue Jul 21 19:43:08 2009
@@ -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

Modified: cfe/trunk/test/Rewriter/rewrite-foreach-4.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-foreach-4.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-foreach-4.m (original)
+++ cfe/trunk/test/Rewriter/rewrite-foreach-4.m Tue Jul 21 19:43:08 2009
@@ -9,7 +9,7 @@
 {
         return 0;
 }
-- (id) allKeys {}
+- (id) allKeys { return 0; }
 @end
 
 @interface MyList (BasicTest)

Modified: cfe/trunk/test/Rewriter/rewrite-foreach-5.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-foreach-5.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-foreach-5.m (original)
+++ cfe/trunk/test/Rewriter/rewrite-foreach-5.m Tue Jul 21 19:43:08 2009
@@ -9,7 +9,7 @@
 {
         return 0;
 }
-- (id) allKeys {}
+- (id) allKeys { return 0; }
 @end
 
 @interface MyList (BasicTest)

Modified: cfe/trunk/test/Sema/arg-scope-c99.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/arg-scope-c99.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/arg-scope-c99.c (original)
+++ cfe/trunk/test/Sema/arg-scope-c99.c Tue Jul 21 19:43:08 2009
@@ -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]) { }

Modified: cfe/trunk/test/Sema/arg-scope.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/arg-scope.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/arg-scope.c (original)
+++ cfe/trunk/test/Sema/arg-scope.c Tue Jul 21 19:43:08 2009
@@ -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]) {}
 

Modified: cfe/trunk/test/Sema/array-constraint.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/array-constraint.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/array-constraint.c (original)
+++ cfe/trunk/test/Sema/array-constraint.c Tue Jul 21 19:43:08 2009
@@ -45,7 +45,7 @@
 
 void strFunc(char *);
 const char staticAry[] = "test";
-int checkStaticAry() { 
+void checkStaticAry() { 
   strFunc(staticAry); // expected-warning{{passing 'char const [5]' discards qualifiers, expected 'char *'}}
 }
 

Modified: cfe/trunk/test/Sema/array-init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/array-init.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/array-init.c (original)
+++ cfe/trunk/test/Sema/array-init.c Tue Jul 21 19:43:08 2009
@@ -219,10 +219,10 @@
 }
 
 // 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];

Modified: cfe/trunk/test/Sema/attr-weak.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-weak.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/attr-weak.c (original)
+++ cfe/trunk/test/Sema/attr-weak.c Tue Jul 21 19:43:08 2009
@@ -5,7 +5,7 @@
 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}}

Modified: cfe/trunk/test/Sema/block-misc.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/block-misc.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/block-misc.c (original)
+++ cfe/trunk/test/Sema/block-misc.c Tue Jul 21 19:43:08 2009
@@ -44,7 +44,7 @@
 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}}
 }
 

Modified: cfe/trunk/test/Sema/builtin-prefetch.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/builtin-prefetch.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/builtin-prefetch.c (original)
+++ cfe/trunk/test/Sema/builtin-prefetch.c Tue Jul 21 19:43:08 2009
@@ -1,6 +1,6 @@
 // RUN: clang-cc -fsyntax-only -verify %s
 
-int foo() {
+void foo() {
   int a;
   __builtin_prefetch(&a);
   __builtin_prefetch(&a, 1);

Modified: cfe/trunk/test/Sema/builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/builtins.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/builtins.c (original)
+++ cfe/trunk/test/Sema/builtins.c Tue Jul 21 19:43:08 2009
@@ -34,7 +34,7 @@
 
 // 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}}

Modified: cfe/trunk/test/Sema/c89.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/c89.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/c89.c (original)
+++ cfe/trunk/test/Sema/c89.c Tue Jul 21 19:43:08 2009
@@ -36,7 +36,7 @@
 
 
 /* Implicit int, always ok */
-test6() {}
+test6() { return 0; }
 
 /* PR2012 */
 test7;  /* expected-warning {{declaration specifier missing, defaulting to 'int'}} */

Modified: cfe/trunk/test/Sema/darwin-align-cast.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/darwin-align-cast.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/darwin-align-cast.c (original)
+++ cfe/trunk/test/Sema/darwin-align-cast.c Tue Jul 21 19:43:08 2009
@@ -19,5 +19,6 @@
   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;
 }
 

Modified: cfe/trunk/test/Sema/decl-type-merging.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/decl-type-merging.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/decl-type-merging.c (original)
+++ cfe/trunk/test/Sema/decl-type-merging.c Tue Jul 21 19:43:08 2009
@@ -6,11 +6,11 @@
 
 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}}
 }
 
 

Modified: cfe/trunk/test/Sema/heinous-extensions-on.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/heinous-extensions-on.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/heinous-extensions-on.c (original)
+++ cfe/trunk/test/Sema/heinous-extensions-on.c Tue Jul 21 19:43:08 2009
@@ -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}}
 }
-

Modified: cfe/trunk/test/Sema/implicit-int.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/implicit-int.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/implicit-int.c (original)
+++ cfe/trunk/test/Sema/implicit-int.c Tue Jul 21 19:43:08 2009
@@ -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'}}

Modified: cfe/trunk/test/Sema/redefinition.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/redefinition.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/redefinition.c (original)
+++ cfe/trunk/test/Sema/redefinition.c Tue Jul 21 19:43:08 2009
@@ -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) {

Modified: cfe/trunk/test/Sema/type-spec-struct-union.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/type-spec-struct-union.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/type-spec-struct-union.c (original)
+++ cfe/trunk/test/Sema/type-spec-struct-union.c Tue Jul 21 19:43:08 2009
@@ -57,7 +57,7 @@
   } mode;
   int             nowrap;
 };
-int 
+void
 wizbiz_quxPoof(z)
   z_foop       z;
 {

Modified: cfe/trunk/test/Sema/va_arg_x86_64.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/va_arg_x86_64.c?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/Sema/va_arg_x86_64.c (original)
+++ cfe/trunk/test/Sema/va_arg_x86_64.c Tue Jul 21 19:43:08 2009
@@ -8,9 +8,8 @@
 
 // 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));
 }
-

Modified: cfe/trunk/test/SemaCXX/abstract.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/abstract.cpp?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaCXX/abstract.cpp (original)
+++ cfe/trunk/test/SemaCXX/abstract.cpp Tue Jul 21 19:43:08 2009
@@ -54,7 +54,7 @@
 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}}

Modified: cfe/trunk/test/SemaCXX/warn-for-var-in-else.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/warn-for-var-in-else.cpp?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaCXX/warn-for-var-in-else.cpp (original)
+++ cfe/trunk/test/SemaCXX/warn-for-var-in-else.cpp Tue Jul 21 19:43:08 2009
@@ -8,6 +8,7 @@
     return X;
   } else {
     do_something(X); // expected-warning{{'X' is always zero in this context}}
+    return 0;
   }
 }
 

Modified: cfe/trunk/test/SemaObjC/access-property-getter.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/access-property-getter.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/access-property-getter.m (original)
+++ cfe/trunk/test/SemaObjC/access-property-getter.m Tue Jul 21 19:43:08 2009
@@ -31,5 +31,6 @@
 - (id)harvestPredictivelyProcessedOutputFiles
 {
      _outputStream.release;
+     return 0;
 }
 @end

Modified: cfe/trunk/test/SemaObjC/category-method-lookup-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/category-method-lookup-2.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/category-method-lookup-2.m (original)
+++ cfe/trunk/test/SemaObjC/category-method-lookup-2.m Tue Jul 21 19:43:08 2009
@@ -17,6 +17,7 @@
 
 - instanceMethod {
   [[self class] classMethod];
+  return 0;
 }
 
 @end

Modified: cfe/trunk/test/SemaObjC/compatible-protocol-qualified-types.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/compatible-protocol-qualified-types.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/compatible-protocol-qualified-types.m (original)
+++ cfe/trunk/test/SemaObjC/compatible-protocol-qualified-types.m Tue Jul 21 19:43:08 2009
@@ -70,6 +70,7 @@
 
 - (NSTextStorage *)contents {
  [_contents setDelegate:self]; // expected-warning {{incompatible type sending 'SKTText *', expected 'id<NSTextStorageDelegate>'}}
+ return 0;
 }
 
 @end

Modified: cfe/trunk/test/SemaObjC/comptypes-a.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/comptypes-a.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/comptypes-a.m (original)
+++ cfe/trunk/test/SemaObjC/comptypes-a.m Tue Jul 21 19:43:08 2009
@@ -13,6 +13,7 @@
 
 NSInteger codeAssistantCaseCompareItems(id<PBXCompletionItem> a, id<PBXCompletionItem> b, void *context)
 {
+  return 0;
 }
 
 @interface TedWantsToVerifyObjCDoesTheRightThing

Modified: cfe/trunk/test/SemaObjC/interface-scope-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/interface-scope-2.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/interface-scope-2.m (original)
+++ cfe/trunk/test/SemaObjC/interface-scope-2.m Tue Jul 21 19:43:08 2009
@@ -83,6 +83,7 @@
 - init {
   LoreStuffNode *node;
   node = &(_historyStuff[1]);
+  return 0;
 }
 @end
 
@@ -108,6 +109,7 @@
   if (self != ((void *)0)) {
     (void)memset(&_nfttFlags, 0, sizeof(struct _OingoBoingoContraptionPeonFlags));
   }
+  return 0;
 }
 @end
 

Modified: cfe/trunk/test/SemaObjC/method-arg-decay.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-arg-decay.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/method-arg-decay.m (original)
+++ cfe/trunk/test/SemaObjC/method-arg-decay.m Tue Jul 21 19:43:08 2009
@@ -87,6 +87,7 @@
       PBXModule *obj = [XCFindPossibleKeyModules(pModule, (BOOL)0) objectOfType:type     matchingFunction:comparator usingData:data];
     }
   }
+  return 0;
 }
 - (BOOL)buffer:(char *)buf containsAnyPrompts:(char *[])prompts
 {

Modified: cfe/trunk/test/SemaObjC/method-conflict.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-conflict.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/method-conflict.m (original)
+++ cfe/trunk/test/SemaObjC/method-conflict.m Tue Jul 21 19:43:08 2009
@@ -47,7 +47,9 @@
 
 + 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 

Modified: cfe/trunk/test/SemaObjC/method-encoding-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-encoding-2.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/method-encoding-2.m (original)
+++ cfe/trunk/test/SemaObjC/method-encoding-2.m Tue Jul 21 19:43:08 2009
@@ -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

Modified: cfe/trunk/test/SemaObjC/method-lookup-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-lookup-2.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/method-lookup-2.m (original)
+++ cfe/trunk/test/SemaObjC/method-lookup-2.m Tue Jul 21 19:43:08 2009
@@ -35,8 +35,8 @@
 
 @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 @@
 - whatever {
   id obj = [[XX alloc] init];
   [[obj class] classMethod];
+  return 0;
 }
 
 @end

Modified: cfe/trunk/test/SemaObjC/method-lookup.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-lookup.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/method-lookup.m (original)
+++ cfe/trunk/test/SemaObjC/method-lookup.m Tue Jul 21 19:43:08 2009
@@ -29,6 +29,7 @@
             [(id)item setPriority:[item priority] / [PBXCodeAssistant factorForRecentCompletion:[item name]]];
         }
     }
+    return 0;
 }
 @end
 

Modified: cfe/trunk/test/SemaObjC/method-typecheck-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-typecheck-1.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/method-typecheck-1.m (original)
+++ cfe/trunk/test/SemaObjC/method-typecheck-1.m Tue Jul 21 19:43:08 2009
@@ -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
-

Modified: cfe/trunk/test/SemaObjC/no-warn-unimpl-method.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/no-warn-unimpl-method.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/no-warn-unimpl-method.m (original)
+++ cfe/trunk/test/SemaObjC/no-warn-unimpl-method.m Tue Jul 21 19:43:08 2009
@@ -38,5 +38,5 @@
         - (void)forwardInvocation:(NSInvocation *)anInvocation
         {
         }
-	- (id) init {}        
+	- (id) init { return 0; }
 @end

Modified: cfe/trunk/test/SemaObjC/property-11.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-11.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/property-11.m (original)
+++ cfe/trunk/test/SemaObjC/property-11.m Tue Jul 21 19:43:08 2009
@@ -29,6 +29,7 @@
   o = x.foo;
   [x setFoo:o];
   x.foo = o;
+  return 0;
 }
 
 @end

Modified: cfe/trunk/test/SemaObjC/property-9-impl-method.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-9-impl-method.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/property-9-impl-method.m (original)
+++ cfe/trunk/test/SemaObjC/property-9-impl-method.m Tue Jul 21 19:43:08 2009
@@ -55,10 +55,11 @@
 
 @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
 

Modified: cfe/trunk/test/SemaObjC/property-method-lookup-impl.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-method-lookup-impl.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/property-method-lookup-impl.m (original)
+++ cfe/trunk/test/SemaObjC/property-method-lookup-impl.m Tue Jul 21 19:43:08 2009
@@ -8,9 +8,7 @@
 
 @implementation SSyncCEList
 
-- (id) list
-{
-}
+- (id) list { return 0; }
 @end
 
 @interface SSyncConflictList : SSyncCEList

Modified: cfe/trunk/test/SemaObjC/protocol-implementation-inherited.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/protocol-implementation-inherited.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/protocol-implementation-inherited.m (original)
+++ cfe/trunk/test/SemaObjC/protocol-implementation-inherited.m Tue Jul 21 19:43:08 2009
@@ -26,7 +26,7 @@
 @end
 
 @implementation B1
--foo {};
+-foo { return 0; };
 @end
 
 // Interface conforms to a protocol whose methods are provided by an

Modified: cfe/trunk/test/SemaObjC/protocol-lookup.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/protocol-lookup.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/protocol-lookup.m (original)
+++ cfe/trunk/test/SemaObjC/protocol-lookup.m Tue Jul 21 19:43:08 2009
@@ -44,6 +44,7 @@
 	[_foo release];
 	[_bar release];
 	[super dealloc];
+	return 0;
 }
 
 @end

Modified: cfe/trunk/test/SemaObjC/super-cat-prot.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/super-cat-prot.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/super-cat-prot.m (original)
+++ cfe/trunk/test/SemaObjC/super-cat-prot.m Tue Jul 21 19:43:08 2009
@@ -35,14 +35,16 @@
 @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

Modified: cfe/trunk/test/SemaObjC/super.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/super.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/super.m (original)
+++ cfe/trunk/test/SemaObjC/super.m Tue Jul 21 19:43:08 2009
@@ -21,6 +21,7 @@
 
 + classMethod {
   [super cMethod]; // expected-warning{{method '+cMethod' not found (return type defaults to 'id')}}
+  return 0;
 }
 @end
 

Modified: cfe/trunk/test/SemaObjC/synchronized.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/synchronized.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/synchronized.m (original)
+++ cfe/trunk/test/SemaObjC/synchronized.m Tue Jul 21 19:43:08 2009
@@ -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')}}

Modified: cfe/trunk/test/SemaObjC/weak-attr-ivar.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/weak-attr-ivar.m?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/weak-attr-ivar.m (original)
+++ cfe/trunk/test/SemaObjC/weak-attr-ivar.m Tue Jul 21 19:43:08 2009
@@ -45,8 +45,7 @@
 }
 @property(copy) NSString *author;
 - (BOOL) isInteresting;
- at end  NSString *FooHUHCodeToString(FooHUHCode HUH) {
-}
+ at end  NSString *FooHUHCodeToString(FooHUHCode HUH) { return 0; }
 @interface FooHUHCodeToStringTransformer: NSValueTransformer {
 }
 @end  @implementation FooPlaypenEntry  @synthesize author = _author;
@@ -62,12 +61,14 @@
       }
     }
   }
+  return 0;
 }
 - (FooHUHCode) HUH {
   if (_HUH == Foo_HUH_NONE) {
     if (_mostInterestingChild)
       return [_mostInterestingChild HUH];
   }
+  return 0;
 }
 @end
 

Modified: cfe/trunk/test/SemaObjCXX/protocol-lookup.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/protocol-lookup.mm?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjCXX/protocol-lookup.mm (original)
+++ cfe/trunk/test/SemaObjCXX/protocol-lookup.mm Tue Jul 21 19:43:08 2009
@@ -44,6 +44,7 @@
 	[_foo release];
 	[_bar release];
 	[super dealloc];
+	return 0;
 }
 
 @end

Modified: cfe/trunk/test/SemaTemplate/ext-vector-type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/ext-vector-type.cpp?rev=76709&r1=76708&r2=76709&view=diff

==============================================================================
--- cfe/trunk/test/SemaTemplate/ext-vector-type.cpp (original)
+++ cfe/trunk/test/SemaTemplate/ext-vector-type.cpp Tue Jul 21 19:43:08 2009
@@ -4,7 +4,7 @@
   typedef T __attribute__((ext_vector_type(Length))) type; 
 };
 
-int test_make1() {
+void test_make1() {
   make1<int, 5>::type x;
   x.x = 4;
 }





More information about the cfe-commits mailing list