p2.cpp revision 91305bf1b2e75937fb60db03cca766ad983fffdb
191305bf1b2e75937fb60db03cca766ad983fffdbDouglas Gregor// RUN: %clang_cc1 -fsyntax-only -verify %s 291305bf1b2e75937fb60db03cca766ad983fffdbDouglas Gregortemplate<class T> struct A { 391305bf1b2e75937fb60db03cca766ad983fffdbDouglas Gregor static T t; // expected-error{{static data member instantiated with function type 'int ()'}} 491305bf1b2e75937fb60db03cca766ad983fffdbDouglas Gregor}; 591305bf1b2e75937fb60db03cca766ad983fffdbDouglas Gregortypedef int function(); 691305bf1b2e75937fb60db03cca766ad983fffdbDouglas GregorA<function> a; // expected-note{{instantiation of}} 791305bf1b2e75937fb60db03cca766ad983fffdbDouglas Gregor 891305bf1b2e75937fb60db03cca766ad983fffdbDouglas Gregortemplate<typename T> struct B { 991305bf1b2e75937fb60db03cca766ad983fffdbDouglas Gregor B() { T t; } // expected-error{{variable instantiated with function type 'int ()'}} 1091305bf1b2e75937fb60db03cca766ad983fffdbDouglas Gregor}; 1191305bf1b2e75937fb60db03cca766ad983fffdbDouglas GregorB<function> b; // expected-note{{instantiation of}} 1291305bf1b2e75937fb60db03cca766ad983fffdbDouglas Gregor 13