summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/function-return.c
blob: 8af074e0a0eee8eb4bfe010845e867b8b11d3de4 (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: clang %s -fsyntax-only -verify -pedantic
// PR2790

void f1() {
  return 0; // expected-warning {{void function 'f1' should not return a value}}
}

int f2() {
  return; // expected-warning {{non-void function 'f2' should return a value}}
}
OpenPOWER on IntegriCloud