1 // RUN: %clang_cc1 -fms-compatibility -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fms-compatibility -fsyntax-only -fms-compatibility-version=12.0 -verify %s
3 
4 struct C {
5   template <typename T> static int foo(T);
6 };
7 
foo(T)8 template <typename T> static int C::foo(T) {
9   //expected-warning@-1 {{'static' can only be specified inside the class definition}}
10   return 0;
11 }
12 
13 template <class T> struct S {
14   void f();
15 };
16 
f()17 template <class T> static void S<T>::f() {}
18 #if _MSC_VER >= 1900
19   //expected-error@-2 {{'static' can only be specified inside the class definition}}
20 #else
21   //expected-warning@-4 {{'static' can only be specified inside the class definition}}
22 #endif
23