Generate error on declaration containing 'static' and '__attribute__((weak))'
Patch by Ryan Flynn


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75879 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/attr-weak.c b/test/Sema/attr-weak.c
index b79e1e7..4e28867 100644
--- a/test/Sema/attr-weak.c
+++ b/test/Sema/attr-weak.c
@@ -11,3 +11,5 @@
 struct __attribute__((weak)) s0 {}; // expected-warning {{'weak' attribute only applies to variable and function types}}
 struct __attribute__((weak_import)) s1 {}; // expected-warning {{'weak_import' attribute only applies to variable and function types}}
 
+static int x __attribute__((weak)); // expected-error {{weak declaration of 'x' must be public}}
+