diff options
Diffstat (limited to 'test/Sema/warn-unused-variables.c')
-rw-r--r-- | test/Sema/warn-unused-variables.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Sema/warn-unused-variables.c b/test/Sema/warn-unused-variables.c index 36615061fe..4d1cde7067 100644 --- a/test/Sema/warn-unused-variables.c +++ b/test/Sema/warn-unused-variables.c @@ -17,3 +17,9 @@ void f1(void) { (void)sizeof(i); return; } + +// PR5933 +int f2() { + int X = 4; // Shouldn't have a bogus 'unused variable X' warning. + return Y + X; // expected-error {{use of undeclared identifier 'Y'}} +} |