mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-04 12:15:46 +00:00
Move test/Sema/return.cpp into test/SemaCXX/return.cpp
llvm-svn: 134171
This commit is contained in:
parent
0b645e9030
commit
de7a9c2415
@ -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}}
|
||||
}
|
||||
};
|
@ -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}}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user