Fixed more -Wreturn-type tests

This commit is contained in:
Dávid Bolvanský 2019-11-09 18:13:34 +01:00
parent 612810e333
commit 5c50109bb5
4 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

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

View File

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

View File

@ -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() {