13573b2c84372d9484296fa658f5276f6c09acb92Daniel Dunbar// RUN: %clang_cc1 -fsyntax-only -verify %s 20093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregorclass X; 30093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregor 40093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregor// C++ [temp.param]p4 50093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortypedef int INT; 60093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregorenum E { enum1, enum2 }; 70093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortemplate<int N> struct A1; 80093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortemplate<INT N, INT M> struct A2; 90093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortemplate<enum E x, E y> struct A3; 100093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortemplate<int &X> struct A4; 110093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortemplate<int *Ptr> struct A5; 120093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortemplate<int (&f)(int, int)> struct A6; 130093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortemplate<int (*fp)(float, double)> struct A7; 140093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortemplate<int X::*pm> struct A8; 150093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortemplate<float (X::*pmf)(float, int)> struct A9; 160093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortemplate<typename T, T x> struct A10; 170093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregor 180093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregortemplate<float f> struct A11; // expected-error{{a non-type template parameter cannot have type 'float'}} 190093ae94ab83a5688d77c22ebade148a93215f87Douglas Gregor 202fd2f7e034165b23a762bf9221adaee5c0599786Eli Friedmantemplate<void *Ptr> struct A12; 212fd2f7e034165b23a762bf9221adaee5c0599786Eli Friedmantemplate<int (*IncompleteArrayPtr)[]> struct A13; 22