Move test/Sema/return.cpp into test/SemaCXX/return.cpp

llvm-svn: 134171
This commit is contained in:
Hans Wennborg 2011-06-30 17:20:18 +00:00
parent 0b645e9030
commit de7a9c2415
2 changed files with 11 additions and 10 deletions

View File

@ -1,10 +0,0 @@
// RUN: %clang %s -fsyntax-only -Wreturn-type
struct C {
C() {
return 42; // expected-warning {{constructor 'C' should not return a value}}
}
~C() {
return 42; // expected-warning {{destructor '~C' should not return a value}}
}
};

View File

@ -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}}
}
};
}