// RUN: %clang_cc1 -fsyntax-only -verify %s // expected-no-diagnostics // PR5908 template void Test(Iterator it) { *(it += 1); } namespace PR6045 { template class A { static const unsigned int member = r; void f(); }; template const unsigned int A::member; template void A::f() { unsigned k; (void)(k % member); } } namespace PR7198 { struct A { ~A() { } }; template struct B { struct C : A {}; void f() { C c = C(); } }; } namespace PR7724 { template int myMethod() { return 2 && sizeof(OT); } } namespace test4 { template T *addressof(T &v) { return reinterpret_cast( &const_cast(reinterpret_cast(v))); } } namespace test5 { template class chained_map { int k; void lookup() const { int &v = (int &)k; } }; } namespace PR8795 { template int test(_CharT t) { int data [] = { sizeof(_CharT) > sizeof(char) }; return data[0]; } } template struct CastDependentIntToPointer { static void* f() { T *x; return ((void*)(((unsigned long)(x)|0x1ul))); } }; // Regression test for crasher in r194540. namespace PR10837 { typedef void t(int); template struct A { void f(); static t g; }; t *p; template void A::f() { p = g; } template struct A; } namespace PR18152 { template struct A { static const int n = {N}; }; template struct A<0>; }