blob: 5130e3e0e6df55e6a97571a7431814edbdd5f800 [file] [log] [blame]
Douglas Gregor5cf0e152011-07-14 04:54:23 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
Douglas Gregor5cf0e152011-07-14 04:54:23 +00003// PR10355
Richard Smithb23c5e82019-05-09 03:31:27 +00004template<typename T> void template_id1() {
5 template_id2<> t; // expected-error-re {{no template named 'template_id2'{{$}}}}
Douglas Gregor5cf0e152011-07-14 04:54:23 +00006 }
Douglas Gregorb11f9452012-03-26 16:54:18 +00007
8// FIXME: It would be nice if we could get this correction right.
9namespace PR12297 {
10 namespace A {
11 typedef short T;
12
13 namespace B {
14 typedef short T;
15
Kaelyn Uhrainb18b0c02013-07-02 23:47:35 +000016 T global(); // expected-note {{'::PR12297::global' declared here}}
Douglas Gregorb11f9452012-03-26 16:54:18 +000017 }
18 }
19
20 using namespace A::B;
21
Kaelyn Uhrainb18b0c02013-07-02 23:47:35 +000022 // FIXME: Adding '::PR12297::' is not needed as removing 'A::' is sufficient
Richard Smith114394f2013-08-09 04:35:01 +000023 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'?}}
Douglas Gregorb11f9452012-03-26 16:54:18 +000024}