blob: 4f3b58c5d53ecfaff6309faf271dd542950a60b2 [file] [log] [blame]
Chris Lattner3b427b32007-10-11 00:18:28 +00001// RUN: clang -fsyntax-only -verify %s
Reid Spencer5f016e22007-07-11 17:01:13 +00002
3extern char *bork;
4char *& bar = bork;
5
6void foo(int &a) {
7}
8
9typedef int & A;
10
11void g(const A aref) {
12}
13
14int & const X; // expected-error {{'const' qualifier may not be applied to a reference}}
15int & volatile Y; // expected-error {{'volatile' qualifier may not be applied to a reference}}
16int & const volatile Z; /* expected-error {{'const' qualifier may not be applied}} \
17 expected-error {{'volatile' qualifier may not be applied}} */