1*f4a2713aSLionel Sambuc // To be used with cxx11-statement-attributes.cpp. 2*f4a2713aSLionel Sambuc template<const int N> f(int n)3*f4a2713aSLionel Sambucint f(int n) { 4*f4a2713aSLionel Sambuc switch (n * N) { 5*f4a2713aSLionel Sambuc case 0: 6*f4a2713aSLionel Sambuc n += 15; 7*f4a2713aSLionel Sambuc [[clang::fallthrough]]; // This shouldn't generate a warning. 8*f4a2713aSLionel Sambuc case 1: 9*f4a2713aSLionel Sambuc n += 20; 10*f4a2713aSLionel Sambuc [[clang::fallthrough]]; // This should generate a warning: "fallthrough annotation does not directly precede switch label". 11*f4a2713aSLionel Sambuc break; 12*f4a2713aSLionel Sambuc } 13*f4a2713aSLionel Sambuc return n; 14*f4a2713aSLionel Sambuc } 15