blob: 81ea82dd163b9bcc7f4a0a5c146ee35037741bc1 [file] [log] [blame]
Tanya Lattnere6bbc012010-02-12 00:07:30 +00001// RUN: %clang_cc1 -fsyntax-only -Wunused-function -verify %s
Daniel Dunbar75d113712010-02-16 19:44:56 +00002// XFAIL: *
Tanya Lattnere6bbc012010-02-12 00:07:30 +00003
4void foo() {}
5static void f2() {}
6static void f1() {f2();} // expected-warning{{unused}}
7
8static int f0() { return 17; } // expected-warning{{unused}}
9int x = sizeof(f0());
10
11static void f3();
12extern void f3() { } // expected-warning{{unused}}
13
14// FIXME: This will trigger a warning when it should not.
15// Update once PR6281 is fixed.
16//inline static void f4();
Daniel Dunbar75d113712010-02-16 19:44:56 +000017//void f4() { }