1*eb2def66SBill Wendling // RUN: clang -parse-ast-check %s &&
2*eb2def66SBill Wendling // XFAIL: *
3cbf4709cSBill Wendling 
46811c0b5SBill Wendling extern char *bork;
56811c0b5SBill Wendling char *& bar = bork;
66811c0b5SBill Wendling 
76811c0b5SBill Wendling void foo(int &a) {
86811c0b5SBill Wendling }
9cbf4709cSBill Wendling 
10cbf4709cSBill Wendling typedef int & A;
11cbf4709cSBill Wendling 
12cbf4709cSBill Wendling void g(const A aref) {
13cbf4709cSBill Wendling }
14cbf4709cSBill Wendling 
15*eb2def66SBill Wendling int & const X; // expected-error {{'const' qualifier may not be applied to a reference}}
16*eb2def66SBill Wendling int & volatile Y; // expected-error {{'volatile' qualifier may not be applied to a reference}}
17*eb2def66SBill Wendling int & const volatile Z; /* expected-error {{'const' qualifier may not be applied}} \
18*eb2def66SBill Wendling                            expected-error {{'volatile' qualifier may not be applied}} */
19