blob: b52f676ac58a431b2457f70e3f47850f4d22fd1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// RUN: %clang_cc1 -fsyntax-only -Wunused-function -verify %s
void foo() {}
static void f2() {}
static void f1() {f2();} // expected-warning{{unused}}
static int f0() { return 17; } // expected-warning{{unused}}
int x = sizeof(f0());
static void f3();
extern void f3() { } // expected-warning{{unused}}
// FIXME: This will trigger a warning when it should not.
// Update once PR6281 is fixed.
//inline static void f4();
//void f4() { }
static void __attribute__((used)) f5() {}
static void f6();
static void __attribute__((used)) f6();
static void f6() {};
static void f7(void);
void f8(void(*a0)(void));
void f9(void) { f8(f7); }
static void f7(void) {}
__attribute__((unused)) static void bar(void);
void bar(void) { }
|