blob: aed0488ebf7b515766a701b154153534c3d93cd5 [file] [log] [blame]
Bill Wendlingeb2def62007-06-27 04:30:12 +00001// RUN: clang -parse-ast-check %s &&
2// XFAIL: *
Bill Wendlingcbf47092007-06-03 09:02:28 +00003
Bill Wendling6811c0b2007-05-27 10:16:12 +00004extern char *bork;
5char *& bar = bork;
6
7void foo(int &a) {
8}
Bill Wendlingcbf47092007-06-03 09:02:28 +00009
10typedef int & A;
11
12void g(const A aref) {
13}
14
Bill Wendlingeb2def62007-06-27 04:30:12 +000015int & const X; // expected-error {{'const' qualifier may not be applied to a reference}}
16int & volatile Y; // expected-error {{'volatile' qualifier may not be applied to a reference}}
17int & const volatile Z; /* expected-error {{'const' qualifier may not be applied}} \
18 expected-error {{'volatile' qualifier may not be applied}} */