Skip to content

Commit 5c50109

Browse files
Fixed more -Wreturn-type tests
1 parent 612810e commit 5c50109

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

clang/bindings/python/tests/cindex/test_diagnostics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_diagnostic_warning(self):
2020
self.assertEqual(tu.diagnostics[0].location.line, 1)
2121
self.assertEqual(tu.diagnostics[0].location.column, 11)
2222
self.assertEqual(tu.diagnostics[0].spelling,
23-
'control reaches end of non-void function')
23+
'non-void function does not return a value')
2424

2525
def test_diagnostic_note(self):
2626
# FIXME: We aren't getting notes here for some reason.

clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ int handleVoidInComma() {
8080
return [obj voidM], 0;
8181
}
8282

83-
int marker(void) { // control reaches end of non-void function
83+
int marker(void) { // non-void function does not return a value
8484
}
8585

8686
// CHECK-darwin8: warning: The receiver of message 'longDoubleM' is nil and returns a value of type 'long double' that will be garbage

clang/test/CodeGenObjCXX/property-dot-reference.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ @implementation TNodeIconAndNameCell
1414
// CHECK: call dereferenceable({{[0-9]+}}) %struct.TFENode* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
1515
// CHECK-NEXT: call void @_ZNK7TFENode6GetURLEv(%struct.TFENode* %{{.*}})
1616
self.node.GetURL();
17-
} // expected-warning {{control reaches end of non-void function}}
17+
} // expected-warning {{non-void function does not return a value}}
1818
@end
1919

2020
// rdar://8437240

clang/test/Frontend/ast-main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ struct S {
1010
};
1111
template<typename T>
1212
T *S<T>::mf() {
13-
// warning: control reaches end of non-void function [-Wreturn-type]
13+
// warning: non-void function does not return a value [-Wreturn-type]
1414
}
1515

1616
void f() {

0 commit comments

Comments
 (0)