diff options
author | Hans Wennborg <hans@hanshq.net> | 2011-06-30 17:20:18 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2011-06-30 17:20:18 +0000 |
commit | 150fee8b2ba3ea6faa12e68cb58adc5e2fc73825 (patch) | |
tree | f5f4f0f18226475c1f508da3ac4c25b82a3cb43f /test/SemaCXX/return.cpp | |
parent | ea4aba0e97ca71369a0f6e287443b670cf5c353f (diff) |
Move test/Sema/return.cpp into test/SemaCXX/return.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/return.cpp')
-rw-r--r-- | test/SemaCXX/return.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/return.cpp b/test/SemaCXX/return.cpp index b457f6ace5..2f98a277f6 100644 --- a/test/SemaCXX/return.cpp +++ b/test/SemaCXX/return.cpp @@ -69,3 +69,14 @@ namespace PR10057 { return S() = value; } } + +namespace return_has_expr { + struct S { + S() { + return 42; // expected-error {{constructor 'S' should not return a value}} + } + ~S() { + return 42; // expected-error {{destructor '~S' should not return a value}} + } + }; +} |