mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 04:46:06 +00:00
Fixed more -Wreturn-type tests
This commit is contained in:
parent
612810e333
commit
5c50109bb5
@ -20,7 +20,7 @@ class TestDiagnostics(unittest.TestCase):
|
||||
self.assertEqual(tu.diagnostics[0].location.line, 1)
|
||||
self.assertEqual(tu.diagnostics[0].location.column, 11)
|
||||
self.assertEqual(tu.diagnostics[0].spelling,
|
||||
'control reaches end of non-void function')
|
||||
'non-void function does not return a value')
|
||||
|
||||
def test_diagnostic_note(self):
|
||||
# FIXME: We aren't getting notes here for some reason.
|
||||
|
@ -80,7 +80,7 @@ int handleVoidInComma() {
|
||||
return [obj voidM], 0;
|
||||
}
|
||||
|
||||
int marker(void) { // control reaches end of non-void function
|
||||
int marker(void) { // non-void function does not return a value
|
||||
}
|
||||
|
||||
// CHECK-darwin8: warning: The receiver of message 'longDoubleM' is nil and returns a value of type 'long double' that will be garbage
|
||||
|
@ -14,7 +14,7 @@ void GetURL() const;
|
||||
// CHECK: call dereferenceable({{[0-9]+}}) %struct.TFENode* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
|
||||
// CHECK-NEXT: call void @_ZNK7TFENode6GetURLEv(%struct.TFENode* %{{.*}})
|
||||
self.node.GetURL();
|
||||
} // expected-warning {{control reaches end of non-void function}}
|
||||
} // expected-warning {{non-void function does not return a value}}
|
||||
@end
|
||||
|
||||
// rdar://8437240
|
||||
|
@ -10,7 +10,7 @@ struct S {
|
||||
};
|
||||
template<typename T>
|
||||
T *S<T>::mf() {
|
||||
// warning: control reaches end of non-void function [-Wreturn-type]
|
||||
// warning: non-void function does not return a value [-Wreturn-type]
|
||||
}
|
||||
|
||||
void f() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user