diff options
Diffstat (limited to 'clang/test/Parser/cxx-reference.cpp')
-rw-r--r-- | clang/test/Parser/cxx-reference.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/test/Parser/cxx-reference.cpp b/clang/test/Parser/cxx-reference.cpp index 4f3b58c5d53..8d65defe7df 100644 --- a/clang/test/Parser/cxx-reference.cpp +++ b/clang/test/Parser/cxx-reference.cpp @@ -3,6 +3,8 @@ extern char *bork; char *& bar = bork; +int val; + void foo(int &a) { } @@ -11,7 +13,7 @@ typedef int & A; void g(const A aref) { } -int & const X; // expected-error {{'const' qualifier may not be applied to a reference}} -int & volatile Y; // expected-error {{'volatile' qualifier may not be applied to a reference}} -int & const volatile Z; /* expected-error {{'const' qualifier may not be applied}} \ +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}} */ |