diff options
Diffstat (limited to 'test/Sema/function.c')
-rw-r--r-- | test/Sema/function.c | 11 |
1 files changed, 11 insertions, 0 deletions
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; +} |