[cfe-commits] r76638 - in /cfe/trunk/test/CodeGen: 2008-07-29-override-alias-decl.c 2009-01-21-invalid-debug-info.m 2009-06-01-addrofknr.c boolassign.c exprs.c function-attributes.c functions.c global-decls.c inline.c unwind-attr.c x86_32-arguments.c x86_64-arguments.c
Mike Stump
mrs at apple.com
Tue Jul 21 13:52:45 PDT 2009
Author: mrs
Date: Tue Jul 21 15:52:43 2009
New Revision: 76638
URL: http://llvm.org/viewvc/llvm-project?rev=76638&view=rev
Log:
Prep for new warning.
Modified:
cfe/trunk/test/CodeGen/2008-07-29-override-alias-decl.c
cfe/trunk/test/CodeGen/2009-01-21-invalid-debug-info.m
cfe/trunk/test/CodeGen/2009-06-01-addrofknr.c
cfe/trunk/test/CodeGen/boolassign.c
cfe/trunk/test/CodeGen/exprs.c
cfe/trunk/test/CodeGen/function-attributes.c
cfe/trunk/test/CodeGen/functions.c
cfe/trunk/test/CodeGen/global-decls.c
cfe/trunk/test/CodeGen/inline.c
cfe/trunk/test/CodeGen/unwind-attr.c
cfe/trunk/test/CodeGen/x86_32-arguments.c
cfe/trunk/test/CodeGen/x86_64-arguments.c
Modified: cfe/trunk/test/CodeGen/2008-07-29-override-alias-decl.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2008-07-29-override-alias-decl.c?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2008-07-29-override-alias-decl.c (original)
+++ cfe/trunk/test/CodeGen/2008-07-29-override-alias-decl.c Tue Jul 21 15:52:43 2009
@@ -1,6 +1,6 @@
// RUN: clang-cc -emit-llvm -o - %s | grep -e "^@f" | count 1
-int x() {}
+int x() { return 1; }
int f() __attribute__((weak, alias("x")));
Modified: cfe/trunk/test/CodeGen/2009-01-21-invalid-debug-info.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2009-01-21-invalid-debug-info.m?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2009-01-21-invalid-debug-info.m (original)
+++ cfe/trunk/test/CodeGen/2009-01-21-invalid-debug-info.m Tue Jul 21 15:52:43 2009
@@ -10,7 +10,7 @@
@interface I1 @end
@implementation I1
--im0 {}
+-im0 { return 0; }
@end
I1 *f1(void) { return 0; }
Modified: cfe/trunk/test/CodeGen/2009-06-01-addrofknr.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2009-06-01-addrofknr.c?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2009-06-01-addrofknr.c (original)
+++ cfe/trunk/test/CodeGen/2009-06-01-addrofknr.c Tue Jul 21 15:52:43 2009
@@ -2,20 +2,21 @@
// PR4289
struct funcptr {
- int (*func)();
+ int (*func)();
};
static int func(f)
- void *f;
+ void *f;
{
+ return 0;
}
int
main(int argc, char *argv[])
{
- struct funcptr fp;
+ struct funcptr fp;
- fp.func = &func;
- fp.func = func;
+ fp.func = &func;
+ fp.func = func;
+ return 0;
}
-
Modified: cfe/trunk/test/CodeGen/boolassign.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/boolassign.c?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/boolassign.c (original)
+++ cfe/trunk/test/CodeGen/boolassign.c Tue Jul 21 15:52:43 2009
@@ -1,6 +1,7 @@
// RUN: clang-cc %s -emit-llvm -o %t
int testBoolAssign(void) {
-int ss;
-if ((ss = ss && ss)) {}
+ int ss;
+ if ((ss = ss && ss)) {}
+ return 1;
}
Modified: cfe/trunk/test/CodeGen/exprs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/exprs.c?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/exprs.c (original)
+++ cfe/trunk/test/CodeGen/exprs.c Tue Jul 21 15:52:43 2009
@@ -15,7 +15,7 @@
}
_Bool test2b;
-int test2() {if (test2b);}
+int test2() { if (test2b); return 0; }
// PR1921
int test3() {
Modified: cfe/trunk/test/CodeGen/function-attributes.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/function-attributes.c?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/function-attributes.c (original)
+++ cfe/trunk/test/CodeGen/function-attributes.c Tue Jul 21 15:52:43 2009
@@ -56,7 +56,7 @@
static __inline__ __attribute__((always_inline))
struct {
int a, b, c, d, e;
-} ai_2() { }
+} ai_2() { while (1) {} }
int foo() {
Modified: cfe/trunk/test/CodeGen/functions.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/functions.c?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/functions.c (original)
+++ cfe/trunk/test/CodeGen/functions.c Tue Jul 21 15:52:43 2009
@@ -32,6 +32,7 @@
// RUN: grep 'define .* @f3' %t | not grep -F '...'
struct foo { int X, Y, Z; } f3() {
+ while (1) {}
}
// PR4423 - This shouldn't crash in codegen
Modified: cfe/trunk/test/CodeGen/global-decls.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/global-decls.c?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/global-decls.c (original)
+++ cfe/trunk/test/CodeGen/global-decls.c Tue Jul 21 15:52:43 2009
@@ -11,7 +11,7 @@
// RUN: grep '@g0_def = weak global i32' %t &&
int g0_def __attribute__((weak)) = 52;
// RUN: grep 'define weak i32 @g1_def()' %t &&
-int __attribute__((weak)) g1_def (void) {}
+int __attribute__((weak)) g1_def (void) { return 0; }
// Force _ext references
void f0() {
Modified: cfe/trunk/test/CodeGen/inline.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/inline.c?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/inline.c (original)
+++ cfe/trunk/test/CodeGen/inline.c Tue Jul 21 15:52:43 2009
@@ -74,6 +74,7 @@
extern int test4(void);
extern __inline __attribute__ ((__gnu_inline__)) int test4(void)
{
+ return 0;
}
void test_test4() { test4(); }
@@ -81,6 +82,7 @@
extern __inline int test5(void);
extern __inline int __attribute__ ((__gnu_inline__)) test5(void)
{
+ return 0;
}
void test_test5() { test5(); }
Modified: cfe/trunk/test/CodeGen/unwind-attr.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/unwind-attr.c?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/unwind-attr.c (original)
+++ cfe/trunk/test/CodeGen/unwind-attr.c Tue Jul 21 15:52:43 2009
@@ -2,4 +2,5 @@
// RUN: clang-cc -emit-llvm -o - %s | grep "@foo()" | grep nounwind
int foo(void) {
+ return 0;
}
Modified: cfe/trunk/test/CodeGen/x86_32-arguments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/x86_32-arguments.c?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/x86_32-arguments.c (original)
+++ cfe/trunk/test/CodeGen/x86_32-arguments.c Tue Jul 21 15:52:43 2009
@@ -11,39 +11,41 @@
// RUN: grep 'define void @f8_2(i32 %a0.0, i32 %a0.1)' %t &&
char f0(void) {
+ return 0;
}
short f1(void) {
+ return 0;
}
int f2(void) {
+ return 0;
}
float f3(void) {
+ return 0;
}
double f4(void) {
+ return 0;
}
long double f5(void) {
+ return 0;
}
-void f6(char a0, short a1, int a2, long long a3, void *a4) {
-}
+void f6(char a0, short a1, int a2, long long a3, void *a4) {}
typedef enum { A, B, C } E;
-void f7(E a0) {
-}
+void f7(E a0) {}
struct s8 {
int a;
int b;
};
-struct s8 f8_1(void) {
-}
-void f8_2(struct s8 a0) {
-}
+struct s8 f8_1(void) { while (1) {} }
+void f8_2(struct s8 a0) {}
// This should be passed just as s8.
@@ -56,10 +58,8 @@
int a : 17;
int b;
};
-struct s9 f9_1(void) {
-}
-void f9_2(struct s9 a0) {
-}
+struct s9 f9_1(void) { while (1) {} }
+void f9_2(struct s9 a0) {}
// Return of small structures and unions
@@ -67,7 +67,7 @@
struct s10 {
union { };
float f;
-} f10(void) {}
+} f10(void) { while (1) {} }
// Small vectors and 1 x {i64,double} are returned in registers
@@ -78,17 +78,17 @@
// RUN: grep '<2 x i64> @f15()' %t &&
// RUN: grep '<2 x i64> @f16()' %t &&
typedef short T11 __attribute__ ((vector_size (4)));
-T11 f11(void) {}
+T11 f11(void) { while (1) {} }
typedef int T12 __attribute__ ((vector_size (8)));
-T12 f12(void) {}
+T12 f12(void) { while (1) {} }
typedef long long T13 __attribute__ ((vector_size (8)));
-T13 f13(void) {}
+T13 f13(void) { while (1) {} }
typedef double T14 __attribute__ ((vector_size (8)));
-T14 f14(void) {}
+T14 f14(void) { while (1) {} }
typedef long long T15 __attribute__ ((vector_size (16)));
-T15 f15(void) {}
+T15 f15(void) { while (1) {} }
typedef double T16 __attribute__ ((vector_size (16)));
-T16 f16(void) {}
+T16 f16(void) { while (1) {} }
// And when the single element in a struct (but not for 64 and
// 128-bits).
@@ -99,60 +99,60 @@
// RUN: grep -F 'void @f20(%4* noalias sret %agg.result)' %t &&
// RUN: grep -F 'void @f21(%5* noalias sret %agg.result)' %t &&
// RUN: grep -F 'void @f22(%6* noalias sret %agg.result)' %t &&
-struct { T11 a; } f17(void) {}
-struct { T12 a; } f18(void) {}
-struct { T13 a; } f19(void) {}
-struct { T14 a; } f20(void) {}
-struct { T15 a; } f21(void) {}
-struct { T16 a; } f22(void) {}
+struct { T11 a; } f17(void) { while (1) {} }
+struct { T12 a; } f18(void) { while (1) {} }
+struct { T13 a; } f19(void) { while (1) {} }
+struct { T14 a; } f20(void) { while (1) {} }
+struct { T15 a; } f21(void) { while (1) {} }
+struct { T16 a; } f22(void) { while (1) {} }
// Single element structures are handled specially
// RUN: grep -F 'float @f23()' %t &&
// RUN: grep -F 'float @f24()' %t &&
// RUN: grep -F 'float @f25()' %t &&
-struct { float a; } f23(void) {}
-struct { float a[1]; } f24(void) {}
-struct { struct {} a; struct { float a[1]; } b; } f25(void) {}
+struct { float a; } f23(void) { while (1) {} }
+struct { float a[1]; } f24(void) { while (1) {} }
+struct { struct {} a; struct { float a[1]; } b; } f25(void) { while (1) {} }
// Small structures are handled recursively
// RUN: grep -F 'i32 @f26()' %t &&
// RUN: grep 'void @f27(%.truct.s27\* noalias sret %agg.result)' %t &&
-struct s26 { struct { char a, b; } a; struct { char a, b; } b; } f26(void) {}
-struct s27 { struct { char a, b, c; } a; struct { char a; } b; } f27(void) {}
+struct s26 { struct { char a, b; } a; struct { char a, b; } b; } f26(void) { while (1) {} }
+struct s27 { struct { char a, b, c; } a; struct { char a; } b; } f27(void) { while (1) {} }
// RUN: grep 'void @f28(%.truct.s28\* noalias sret %agg.result)' %t &&
-struct s28 { int a; int b[]; } f28(void) {}
+struct s28 { int a; int b[]; } f28(void) { while (1) {} }
// RUN: grep 'define i16 @f29()' %t &&
-struct s29 { struct { } a[1]; char b; char c; } f29(void) {}
+struct s29 { struct { } a[1]; char b; char c; } f29(void) { while (1) {} }
// RUN: grep 'define i16 @f30()' %t &&
-struct s30 { char a; char b : 4; } f30(void) {}
+struct s30 { char a; char b : 4; } f30(void) { while (1) {} }
// RUN: grep 'define float @f31()' %t &&
-struct s31 { char : 0; float b; char : 0; } f31(void) {}
+struct s31 { char : 0; float b; char : 0; } f31(void) { while (1) {} }
// RUN: grep 'define i32 @f32()' %t &&
-struct s32 { char a; unsigned : 0; } f32(void) {}
+struct s32 { char a; unsigned : 0; } f32(void) { while (1) {} }
// RUN: grep 'define float @f33()' %t &&
-struct s33 { float a; long long : 0; } f33(void) {}
+struct s33 { float a; long long : 0; } f33(void) { while (1) {} }
// RUN: grep 'define float @f34()' %t &&
-struct s34 { struct { int : 0; } a; float b; } f34(void) {}
+struct s34 { struct { int : 0; } a; float b; } f34(void) { while (1) {} }
// RUN: grep 'define i16 @f35()' %t &&
-struct s35 { struct { int : 0; } a; char b; char c; } f35(void) {}
+struct s35 { struct { int : 0; } a; char b; char c; } f35(void) { while (1) {} }
// RUN: grep 'define i16 @f36()' %t &&
-struct s36 { struct { int : 0; } a[2][10]; char b; char c; } f36(void) {}
+struct s36 { struct { int : 0; } a[2][10]; char b; char c; } f36(void) { while (1) {} }
// RUN: grep 'define float @f37()' %t &&
-struct s37 { float c[1][1]; } f37(void) {}
+struct s37 { float c[1][1]; } f37(void) { while (1) {} }
// RUN: grep 'define void @f38(.struct.s38. noalias sret .agg.result)' %t &&
-struct s38 { char a[3]; short b; } f38(void) {}
+struct s38 { char a[3]; short b; } f38(void) { while (1) {} }
// RUN: grep 'define void @f39(.struct.s39. byval align 16 .x)' %t &&
typedef int v39 __attribute((vector_size(16)));
Modified: cfe/trunk/test/CodeGen/x86_64-arguments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/x86_64-arguments.c?rev=76638&r1=76637&r2=76638&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/x86_64-arguments.c (original)
+++ cfe/trunk/test/CodeGen/x86_64-arguments.c Tue Jul 21 15:52:43 2009
@@ -12,21 +12,27 @@
// RUN: grep 'define void @f8_2(.0)' %t &&
char f0(void) {
+ return 0;
}
short f1(void) {
+ return 0;
}
int f2(void) {
+ return 0;
}
float f3(void) {
+ return 0;
}
double f4(void) {
+ return 0;
}
long double f5(void) {
+ return 0;
}
void f6(char a0, short a1, int a2, long long a3, void *a4) {
@@ -42,23 +48,23 @@
long double a;
int b;
};
-union u8 f8_1() {}
+union u8 f8_1() { while (1) {} }
void f8_2(union u8 a0) {}
// RUN: grep 'define i64 @f9()' %t &&
-struct s9 { int a; int b; int : 0; } f9(void) {}
+struct s9 { int a; int b; int : 0; } f9(void) { while (1) {} }
// RUN: grep 'define void @f10(i64)' %t &&
struct s10 { int a; int b; int : 0; };
void f10(struct s10 a0) {}
// RUN: grep 'define void @f11(.union.anon. noalias sret .agg.result)' %t &&
-union { long double a; float b; } f11() {}
+union { long double a; float b; } f11() { while (1) {} }
// RUN: grep 'define i64 @f12_0()' %t &&
// RUN: grep 'define void @f12_1(i64)' %t &&
struct s12 { int a __attribute__((aligned(16))); };
-struct s12 f12_0(void) {}
+struct s12 f12_0(void) { while (1) {} }
void f12_1(struct s12 a0) {}
// Check that sret parameter is accounted for when checking available integer
@@ -67,7 +73,7 @@
struct s13_0 { long long f0[3]; };
struct s13_0 f13(int a, int b, int c, int d,
- struct s13_1 { long long f0[2]; } e, int f) {}
+ struct s13_1 { long long f0[2]; } e, int f) { while (1) {} }
// RUN: grep 'define void @f14(.*, i8 signext .X)' %t &&
void f14(int a, int b, int c, int d, int e, int f,
@@ -86,6 +92,6 @@
// RUN: grep '.1 = bitcast i64. .tmp to .struct.f18_s0.' %t &&
// RUN: grep '.2 = load .struct.f18_s0. .1, align 1' %t &&
// RUN: grep 'store .struct.f18_s0 .2, .struct.f18_s0. .f18_arg1' %t &&
-void f18(int a, struct f18_s0 { int f0; } f18_arg1) {}
+void f18(int a, struct f18_s0 { int f0; } f18_arg1) { while (1) {} }
// RUN: true
More information about the cfe-commits
mailing list