Clang Project

clang_source_code/test/SemaCXX/warn-static-outside-class-definition.cpp
1// RUN: %clang_cc1 -fms-compatibility -fsyntax-only -verify %s
2
3struct C {
4  template <typename T> static int foo(T);
5};
6
7template <typename T> static int C::foo(T) { 
8  //expected-warning@-1 {{'static' can only be specified inside the class definition}}
9  return 0;
10}
11
12