aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/warn-unused-function.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-09 17:25:05 +0000
committerChris Lattner <sabre@nondot.org>2010-04-09 17:25:05 +0000
commit1a4221cbe1912421ed7e29d0bbac39e9792af8a2 (patch)
treefbaa40c7340bf6478cf6e46ab8fcdb618469e67e /test/Sema/warn-unused-function.c
parent9f692a0308975cf24ef117c05e31284a1a944e86 (diff)
Don't warn about unused static functions if they are marked with
attr constructor or destructor. Patch by Jean-Daniel Dupas! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100870 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/warn-unused-function.c')
-rw-r--r--test/Sema/warn-unused-function.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/warn-unused-function.c b/test/Sema/warn-unused-function.c
index 095532bcde..d5e676b116 100644
--- a/test/Sema/warn-unused-function.c
+++ b/test/Sema/warn-unused-function.c
@@ -30,3 +30,8 @@ static void f7(void) {}
__attribute__((unused)) static void bar(void);
void bar(void) { }
+__attribute__((constructor)) static void bar2(void);
+void bar2(void) { }
+
+__attribute__((destructor)) static void bar3(void);
+void bar3(void) { }