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