From ea266cad53e3d49771fa38103913d3ec7a166694 Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 10 Jun 2013 20:45:12 +0000 Subject: Vendor import of clang tags/RELEASE_33/final r183502 (effectively, 3.3 release): http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_33/final@183502 --- test/Sema/function.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/Sema/function.c') diff --git a/test/Sema/function.c b/test/Sema/function.c index 1b0dc2a..bbf81a5 100644 --- a/test/Sema/function.c +++ b/test/Sema/function.c @@ -92,3 +92,14 @@ void t20(int i...) { } // expected-error {{requires a comma}} int n; void t21(int n, int (*array)[n]); + +int func_e(int x) { + int func_n(int y) { // expected-error {{function definition is not allowed here}} + if (y > 22) { + return y+2; + } else { + return y-2; + } + } + return x + 3; +} -- cgit v1.1