Tests for return statement checks

llvm-svn: 57341
This commit is contained in:
Seo Sanghyeon 2008-10-10 07:20:06 +00:00
parent 6e5eccf86b
commit c9e7c272da
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
// RUN: clang %s -fsyntax-only -verify -pedantic
// PR2790
void f1() {
return 0; // expected-warning {{void function 'f1' should not return a value}}
}
int f2() {
return; // expected-warning {{non-void function 'f2' should return a value}}
}