1 // RUN: clang-cc -fsyntax-only -pedantic -fixit %s -o - | clang-cc -fsyntax-only -pedantic -Werror -x c++ - 2 3 /* This is a test of the various code modification hints that are 4 provided as part of warning or extension diagnostics. All of the 5 warnings will be fixed by -fixit, and the resulting file should 6 compile cleanly with -Werror -pedantic. */ 7 8 struct C1 { 9 virtual void f(); 10 static void g(); 11 }; 12 struct C2 : virtual public virtual C1 { }; // expected-error{{duplicate}} 13 14 virtual void C1::f() { } // expected-error{{'virtual' can only be specified inside the class definition}} 15 16 static void C1::g() { } // expected-error{{'static' can only be specified inside the class definition}} 17 18 template<int Value> struct CT { }; // expected-note{{previous use is here}} 19 20 CT<10 >> 2> ct; // expected-warning{{require parentheses}} 21 22 class C3 { 23 public: 24 C3(C3, int i = 0); // expected-error{{copy constructor must pass its first argument by reference}} 25 }; 26 27 struct CT<0> { }; // expected-error{{'template<>'}} 28 29 template<> class CT<1> { }; // expected-error{{tag type}} 30