aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/function.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-12-18 02:01:17 +0000
committerChris Lattner <sabre@nondot.org>2008-12-18 02:01:17 +0000
commit65ce04bef06696379682410f399f37b43996d824 (patch)
tree2b4ee00a7f12303607282c9108f97e4442fce4f0 /test/Sema/function.c
parentbc8d56496a6ecdba14769df03d75c001184f8c54 (diff)
Merge function-return.c into function.c
Fix PR2790 by making a warning an EXTWARN instead of EXTENSION. Add a new EXTENSION warning for "return (some void expression);" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61187 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/function.c')
-rw-r--r--test/Sema/function.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/function.c b/test/Sema/function.c
index f2aa8d9216..de970a09b3 100644
--- a/test/Sema/function.c
+++ b/test/Sema/function.c
@@ -32,3 +32,10 @@ void t11(){t10(1);}
// PR3208
void t12(int) {} // expected-error{{parameter name omitted}}
+// PR2790
+void t13() {
+ return 0; // expected-warning {{void function 't13' should not return a value}}
+}
+int t14() {
+ return; // expected-warning {{non-void function 't14' should return a value}}
+}