diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 56d91b49b13fe55c918afbda19f6165b5fbff87a (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /test/SemaCXX/uninit-variables.cpp | |
parent | 41e20f564abdb05101d6b2b29c59459a966c22cc (diff) |
Notes
Diffstat (limited to 'test/SemaCXX/uninit-variables.cpp')
-rw-r--r-- | test/SemaCXX/uninit-variables.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaCXX/uninit-variables.cpp b/test/SemaCXX/uninit-variables.cpp index eb6428d631f2b..687bfd2638d4f 100644 --- a/test/SemaCXX/uninit-variables.cpp +++ b/test/SemaCXX/uninit-variables.cpp @@ -141,3 +141,9 @@ void test_bitcasts_2() { int y = (float &)x; // expected-warning {{uninitialized when used here}} } +void consume_const_ref(const int &n); +int test_const_ref() { + int n; // expected-note {{variable}} + consume_const_ref(n); + return n; // expected-warning {{uninitialized when used here}} +} |