2007-06-09 02:14:27 +08:00
|
|
|
// RUN: not clang -fsyntax-only %s &&
|
2007-06-03 17:02:28 +08:00
|
|
|
// RUN: clang -fsyntax-only %s 2>&1 | grep "error: 'const' qualifier may not be applied to a reference" &&
|
|
|
|
// RUN: clang -fsyntax-only %s 2>&1 | grep "error: 'volatile' qualifier may not be applied to a reference"
|
|
|
|
|
2007-05-27 18:16:12 +08:00
|
|
|
extern char *bork;
|
|
|
|
char *& bar = bork;
|
|
|
|
|
|
|
|
void foo(int &a) {
|
|
|
|
}
|
2007-06-03 17:02:28 +08:00
|
|
|
|
|
|
|
typedef int & A;
|
|
|
|
|
|
|
|
void g(const A aref) {
|
|
|
|
}
|
|
|
|
|
|
|
|
int & const X;
|
|
|
|
int & volatile Y;
|
|
|
|
int & const volatile Z;
|
|
|
|
|