1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc template <class Element> foo()4*f4a2713aSLionel Sambucvoid foo() { 5*f4a2713aSLionel Sambuc } 6*f4a2713aSLionel Sambuc template <> 7*f4a2713aSLionel Sambuc __attribute__((visibility("hidden"))) // expected-note {{previous attribute is here}} 8*f4a2713aSLionel Sambuc void foo<int>(); 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc template <> 11*f4a2713aSLionel Sambuc void foo<int>(); 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc template <> 14*f4a2713aSLionel Sambuc __attribute__((visibility("default"))) // expected-error {{visibility does not match previous declaration}} foo()15*f4a2713aSLionel Sambucvoid foo<int>() { 16*f4a2713aSLionel Sambuc } 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc struct x3 { 19*f4a2713aSLionel Sambuc static int y; 20*f4a2713aSLionel Sambuc } __attribute((visibility("default"))); // expected-warning {{attribute 'visibility' after definition is ignored}} 21