// RUN: %clang_cc1 -verify -fsyntax-only %s // The diagnostics we produce for this code tickled a bug in raw_ostream. template class allocator; template struct char_traits; template , typename _Alloc = allocator<_CharT> > class basic_string; typedef basic_string wstring; class Closure { }; template class Callback1 { }; template class Callback2 { }; template class ResultCallback1 { }; template class AAAAAAAResultCallback_2_1 : public ResultCallback1 { }; template class AAAAAAAResultCallback_2_1< del, void, T, P1, P2, A1> : public Callback1 { public: typedef Callback1 base; }; template inline typename AAAAAAAResultCallback_2_1::base* NewCallback(T1* obj, R(T2::* member)(P1, P2, A1), const P1& p1, const P2& p2) {} namespace util { class Status {}; } class xxxxxxxxxxxxxxxxx { void Bar(wstring* s, util::Status* status, Callback2* done); void Foo(); }; void xxxxxxxxxxxxxxxxx::Foo() { wstring* s = __null; util::Status* status = __null; Closure* cb = NewCallback(this, &xxxxxxxxxxxxxxxxx::Bar, s, status); // expected-error{{cannot initialize}} }