blob: 955437916e11b33ea10a7c22bc0cbe5431201995 [file] [log] [blame]
Ted Kremenek9f3d9422007-09-26 20:14:22 +00001// RUN: clang -parse-ast -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}} */