diff options
Diffstat (limited to 'test/SemaCXX/return.cpp')
-rw-r--r-- | test/SemaCXX/return.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaCXX/return.cpp b/test/SemaCXX/return.cpp index af7f50c..b457f6a 100644 --- a/test/SemaCXX/return.cpp +++ b/test/SemaCXX/return.cpp @@ -39,6 +39,11 @@ g(); char* const h(); // expected-warning{{'const' type qualifier on return type has no effect}} char* volatile i(); // expected-warning{{'volatile' type qualifier on return type has no effect}} +char* +volatile // expected-warning{{'const volatile' type qualifiers on return type have no effect}} +const +j(); + const volatile int scalar_cv(); // expected-warning{{'const volatile' type qualifiers on return type have no effect}} } @@ -53,3 +58,14 @@ namespace PR9328 { class foo { operator int * const (); }; + +namespace PR10057 { + struct S { + ~S(); + }; + + template <class VarType> + void Test(const VarType& value) { + return S() = value; + } +} |