Tanya Lattner | e6bbc01 | 2010-02-12 00:07:30 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -Wunused-function -verify %s |
| 2 | |
| 3 | void foo() {} |
| 4 | static void f2() {} |
| 5 | static void f1() {f2();} // expected-warning{{unused}} |
| 6 | |
| 7 | static int f0() { return 17; } // expected-warning{{unused}} |
| 8 | int x = sizeof(f0()); |
| 9 | |
| 10 | static void f3(); |
| 11 | extern 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() { } |