From 311bf2916be85a0eb5fe3e89ee074c20c98abab0 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 13 Feb 2009 22:48:56 +0000 Subject: Warn about attribute used ignored on "extern int a __attribute__((used))". llvm-svn: 64499 --- clang/test/Sema/attr-used.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/test/Sema/attr-used.c') diff --git a/clang/test/Sema/attr-used.c b/clang/test/Sema/attr-used.c index 7d0265ef323..10674814ce2 100644 --- a/clang/test/Sema/attr-used.c +++ b/clang/test/Sema/attr-used.c @@ -1,5 +1,8 @@ // RUN: clang -verify -fsyntax-only %s +extern int l0 __attribute__((used)); // expected-warning {{used attribute ignored}} +__private_extern__ int l1 __attribute__((used)); // expected-warning {{used attribute ignored}} + struct __attribute__((used)) s { // expected-warning {{'used' attribute only applies to variable and function types}} int x; }; -- cgit v1.2.3