1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify %s 2*67e74705SXin Li 3*67e74705SXin Li // FIXME: The diagnostics and recovery here are very, very poor. 4*67e74705SXin Li 5*67e74705SXin Li // PR10355 template_id1()6*67e74705SXin Litemplate<typename T> void template_id1() { // expected-note {{'template_id1' declared here}} \ 7*67e74705SXin Li // expected-note {{possible target for call}} 8*67e74705SXin Li template_id2<> t; // expected-error {{no template named 'template_id2'; did you mean 'template_id1'?}} \ 9*67e74705SXin Li // expected-error {{expected ';' after expression}} \ 10*67e74705SXin Li // expected-error {{reference to overloaded function could not be resolved; did you mean to call it?}} \ 11*67e74705SXin Li // expected-error {{use of undeclared identifier 't'}} 12*67e74705SXin Li } 13*67e74705SXin Li 14*67e74705SXin Li // FIXME: It would be nice if we could get this correction right. 15*67e74705SXin Li namespace PR12297 { 16*67e74705SXin Li namespace A { 17*67e74705SXin Li typedef short T; 18*67e74705SXin Li 19*67e74705SXin Li namespace B { 20*67e74705SXin Li typedef short T; 21*67e74705SXin Li 22*67e74705SXin Li T global(); // expected-note {{'::PR12297::global' declared here}} 23*67e74705SXin Li } 24*67e74705SXin Li } 25*67e74705SXin Li 26*67e74705SXin Li using namespace A::B; 27*67e74705SXin Li 28*67e74705SXin Li // FIXME: Adding '::PR12297::' is not needed as removing 'A::' is sufficient 29*67e74705SXin Li T A::global(); // expected-error {{out-of-line declaration of 'global' does not match any declaration in namespace 'PR12297::A'; did you mean '::PR12297::global'?}} 30*67e74705SXin Li } 31