Fix the clang-wpa example.
[clang.git] / test / Parser / cxx-reference.cpp
blobfae938bcaab01dc40609e3a58db26ffba8b0e24e
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-warning {{rvalue references are a C++0x extension}}