blob: d96cede68a61a56c0a057caf438090b64aa560a5 [file] [log] [blame]
Steve Naroff2c0ccd02009-04-30 16:01:26 +00001// RUN: clang-cc %s -fsyntax-only -verify
2
3// clang emits the following warning by default.
4// With GCC, -pedantic, -Wreturn-type or -Wall are required to produce the
5// following warning.
6int t14() {
7 return; // expected-warning {{non-void function 't14' should return a value}}
8}
9
Steve Naroff940ab972009-04-30 17:53:16 +000010void t15() {
11 return 1; // expected-warning {{void function 't15' should not return a value}}
12}