1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
3 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
15 void g(const A aref
) { // expected-warning {{'const' qualifier on reference type 'A' (aka 'int &') has no effect}}
18 int & const X
= val
; // expected-error {{'const' qualifier may not be applied to a reference}}
19 int & volatile Y
= val
; // expected-error {{'volatile' qualifier may not be applied to a reference}}
20 int & const volatile Z
= val
; /* expected-error {{'const' qualifier may not be applied}} \
21 expected-error {{'volatile' qualifier may not be applied}} */
24 #if __cplusplus <= 199711L
25 // expected-warning@-2 {{rvalue references are a C++11 extension}}