blob: 955437916e11b33ea10a7c22bc0cbe5431201995 [file] [log] [blame]
Ted Kremenek56b70862007-09-26 20:14:22 +00001// RUN: clang -parse-ast -verify %s
Chris Lattner4b009652007-07-25 00:24:17 +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}} */