warn-unused-function.c revision e6bbc01d1c4ec5241df36042e0a4a12a6711934b
1// RUN: %clang_cc1 -fsyntax-only -Wunused-function -verify %s
2
3void foo() {}
4static void f2() {}
5static void f1() {f2();} // expected-warning{{unused}}
6
7static int f0() { return 17; } // expected-warning{{unused}}
8int x = sizeof(f0());
9
10static void f3();
11extern void f3() { } // expected-warning{{unused}}
12
13// FIXME: This will trigger a warning when it should not.
14// Update once PR6281 is fixed.
15//inline static void f4();
16//void f4() { }