Files
llvm/clang/test/Parser/cxx-reference.cpp
Sebastian Redl ed0f3b021e Parser support for rvalue references.
llvm-svn: 67033
2009-03-15 22:02:01 +00:00

25 lines
603 B
C++

// RUN: clang -fsyntax-only -verify -std=c++0x %s
extern char *bork;
char *& bar = bork;
int val;
void foo(int &a) {
}
typedef int & A;
void g(const A aref) {
}
int & const X = val; // expected-error {{'const' qualifier may not be applied to a reference}}
int & volatile Y = val; // expected-error {{'volatile' qualifier may not be applied to a reference}}
int & const volatile Z = val; /* expected-error {{'const' qualifier may not be applied}} \
expected-error {{'volatile' qualifier may not be applied}} */
int && r1(int &&a);
typedef int && R;
void r2(const R a);