1 // RUN: %clang_cc1 -fsyntax-only -verify %s
13 void g(const A aref
) {
16 int & const X
= val
; // expected-error {{'const' qualifier may not be applied to a reference}}
17 int & volatile Y
= val
; // expected-error {{'volatile' qualifier may not be applied to a reference}}
18 int & const volatile Z
= val
; /* expected-error {{'const' qualifier may not be applied}} \
19 expected-error {{'volatile' qualifier may not be applied}} */
21 typedef int && RV
; // expected-error {{rvalue references are only allowed in C++0x}}