1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
5 template <typename Iterator
>
6 void Test(Iterator it
) {
11 template<unsigned int r
>
14 static const unsigned int member
= r
;
18 template<unsigned int r
>
19 const unsigned int A
<r
>::member
;
21 template<unsigned int r
>
46 template<typename OT
> int myMethod()
47 { return 2 && sizeof(OT
); }
51 template <typename T
> T
*addressof(T
&v
) {
52 return reinterpret_cast<T
*>(
53 &const_cast<char&>(reinterpret_cast<const volatile char &>(v
)));
58 template <typename T
> class chained_map
{
67 template<typename T
> T
f() {
75 template <class _CharT
> int test(_CharT t
)
78 sizeof(_CharT
) > sizeof(char)
84 template<typename T
> struct CastDependentIntToPointer
{
87 return ((void*)(((unsigned long)(x
)|0x1ul
)));
91 // Regression test for crasher in r194540.
94 template<typename
> struct A
{
99 template<typename T
> void A
<T
>::f() {
102 template struct A
<int>;
106 template<int N
> struct A
{
107 static const int n
= {N
};
109 template struct A
<0>;