diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
| commit | 45b533945f0851ec234ca846e1af5ee1e4df0b6e (patch) | |
| tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /test/Parser/cxx-reference.cpp | |
| parent | 7e86edd64bfae4e324224452e4ea879b3371a4bd (diff) | |
Notes
Diffstat (limited to 'test/Parser/cxx-reference.cpp')
| -rw-r--r-- | test/Parser/cxx-reference.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Parser/cxx-reference.cpp b/test/Parser/cxx-reference.cpp index b62638b1a4f92..58bd7ab607276 100644 --- a/test/Parser/cxx-reference.cpp +++ b/test/Parser/cxx-reference.cpp @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s extern char *bork; char *& bar = bork; @@ -18,4 +20,7 @@ int & volatile Y = val; // expected-error {{'volatile' qualifier may not be appl int & const volatile Z = val; /* expected-error {{'const' qualifier may not be applied}} \ expected-error {{'volatile' qualifier may not be applied}} */ -typedef int && RV; // expected-warning {{rvalue references are a C++11 extension}} +typedef int && RV; +#if __cplusplus <= 199711L +// expected-warning@-2 {{rvalue references are a C++11 extension}} +#endif |
