diff options
Diffstat (limited to 'test/SemaCXX/references.cpp')
-rw-r--r-- | test/SemaCXX/references.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaCXX/references.cpp b/test/SemaCXX/references.cpp index 9067a8661d7c..e03abf4300a3 100644 --- a/test/SemaCXX/references.cpp +++ b/test/SemaCXX/references.cpp @@ -87,3 +87,18 @@ void test8(int& const,// expected-error{{'const' qualifier may not be applied to typedef intref const intref_c; // okay. FIXME: how do we verify that this is the same type as intref? } + + +class string { + char *Data; + unsigned Length; +public: + string(); + ~string(); +}; + +string getInput(); + +void test9() { + string &s = getInput(); // expected-error{{lvalue reference}} +} |