diff options
author | Chris Lattner <sabre@nondot.org> | 2008-02-06 21:20:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-02-06 21:20:34 +0000 |
commit | c8edf6bd5f76bf50411d037c83d36847edfa68f0 (patch) | |
tree | a0c9b7491e488438c88f1618965a7ad6bfb1fdf6 /test/CodeGen/statements.c | |
parent | dac2b54b1c6e91569585ef9904295feda2ef3ae9 (diff) |
explicitly document that return statement argument does not necessarily follow the result type of the function. Add testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46823 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/statements.c')
-rw-r--r-- | test/CodeGen/statements.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/CodeGen/statements.c b/test/CodeGen/statements.c index 46d19dbc52..4092121393 100644 --- a/test/CodeGen/statements.c +++ b/test/CodeGen/statements.c @@ -1,9 +1,13 @@ -// RUN: clang %s -emit-llvm +// RUN: clang < %s -emit-llvm -void foo(int x) { +void test1(int x) { switch (x) { case 111111111111111111111111111111111111111: bar(); } } +// Mismatched type between return and function result. +int test2() { return; } +void test3() { return 4; } + |