Bill Wendling | eb2def6 | 2007-06-27 04:30:12 +0000 | [diff] [blame^] | 1 | // RUN: clang -parse-ast-check %s && |
| 2 | // XFAIL: * |
Bill Wendling | cbf4709 | 2007-06-03 09:02:28 +0000 | [diff] [blame] | 3 | |
Bill Wendling | 6811c0b | 2007-05-27 10:16:12 +0000 | [diff] [blame] | 4 | extern char *bork; |
| 5 | char *& bar = bork; |
| 6 | |
| 7 | void foo(int &a) { |
| 8 | } |
Bill Wendling | cbf4709 | 2007-06-03 09:02:28 +0000 | [diff] [blame] | 9 | |
| 10 | typedef int & A; |
| 11 | |
| 12 | void g(const A aref) { |
| 13 | } |
| 14 | |
Bill Wendling | eb2def6 | 2007-06-27 04:30:12 +0000 | [diff] [blame^] | 15 | int & const X; // expected-error {{'const' qualifier may not be applied to a reference}} |
| 16 | int & volatile Y; // expected-error {{'volatile' qualifier may not be applied to a reference}} |
| 17 | int & const volatile Z; /* expected-error {{'const' qualifier may not be applied}} \ |
| 18 | expected-error {{'volatile' qualifier may not be applied}} */ |