diff options
Diffstat (limited to 'clang/test/Sema/uninit-variables.c')
| -rw-r--r-- | clang/test/Sema/uninit-variables.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/test/Sema/uninit-variables.c b/clang/test/Sema/uninit-variables.c index ee3e88a49c8..f09d44ca44f 100644 --- a/clang/test/Sema/uninit-variables.c +++ b/clang/test/Sema/uninit-variables.c @@ -91,8 +91,10 @@ void test14() { for (;;) {} } -void test15() { - int x = x; // no-warning: signals intended lack of initialization. +int test15() { + int x = x; // no-warning: signals intended lack of initialization. \ + // expected-note{{variable 'x' is declared here}} + return x; // expected-warning{{variable 'x' is possibly uninitialized when used here}} } // Don't warn in the following example; shows dataflow confluence. |

