Do not warn with -Wuninitialized when the member is used in a sizeof or address-of...
[clang.git] / test / Parser / cxx-reference.cpp
blob46f9fb07dba05c951af2a7cc95e9ee8536e0b49c
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 extern char *bork;
4 char *& bar = bork;
6 int val;
8 void foo(int &a) {
11 typedef int & A;
13 void g(const A aref) {
16 int & const X = val; // expected-error {{'const' qualifier may not be applied to a reference}}
17 int & volatile Y = val; // expected-error {{'volatile' qualifier may not be applied to a reference}}
18 int & const volatile Z = val; /* expected-error {{'const' qualifier may not be applied}} \
19 expected-error {{'volatile' qualifier may not be applied}} */
21 typedef int && RV; // expected-error {{rvalue references are only allowed in C++0x}}