blob: 44a2a03c9cc76f1d5077e30f562870f09762366e [file] [log] [blame]
Reid Spencer5f016e22007-07-11 17:01:13 +00001// RUN: clang -parse-ast-check %s
2
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}} */