summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/uninit-variables.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerdim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /test/SemaCXX/uninit-variables.cpp
parentbb67ca86b31f67faee50bd10c3b036d65751745a (diff)
downloadFreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip
FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/SemaCXX/uninit-variables.cpp')
-rw-r--r--test/SemaCXX/uninit-variables.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaCXX/uninit-variables.cpp b/test/SemaCXX/uninit-variables.cpp
index eb6428d..687bfd2 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}}
+}
OpenPOWER on IntegriCloud