Douglas Gregor | 5cf0e15 | 2011-07-14 04:54:23 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
Douglas Gregor | 5cf0e15 | 2011-07-14 04:54:23 +0000 | [diff] [blame] | 3 | // PR10355 |
Richard Smith | b23c5e8 | 2019-05-09 03:31:27 +0000 | [diff] [blame] | 4 | template<typename T> void template_id1() { |
| 5 | template_id2<> t; // expected-error-re {{no template named 'template_id2'{{$}}}} |
Douglas Gregor | 5cf0e15 | 2011-07-14 04:54:23 +0000 | [diff] [blame] | 6 | } |
Douglas Gregor | b11f945 | 2012-03-26 16:54:18 +0000 | [diff] [blame] | 7 | |
| 8 | // FIXME: It would be nice if we could get this correction right. |
| 9 | namespace PR12297 { |
| 10 | namespace A { |
| 11 | typedef short T; |
| 12 | |
| 13 | namespace B { |
| 14 | typedef short T; |
| 15 | |
Kaelyn Uhrain | b18b0c0 | 2013-07-02 23:47:35 +0000 | [diff] [blame] | 16 | T global(); // expected-note {{'::PR12297::global' declared here}} |
Douglas Gregor | b11f945 | 2012-03-26 16:54:18 +0000 | [diff] [blame] | 17 | } |
| 18 | } |
| 19 | |
| 20 | using namespace A::B; |
| 21 | |
Kaelyn Uhrain | b18b0c0 | 2013-07-02 23:47:35 +0000 | [diff] [blame] | 22 | // FIXME: Adding '::PR12297::' is not needed as removing 'A::' is sufficient |
Richard Smith | 114394f | 2013-08-09 04:35:01 +0000 | [diff] [blame] | 23 | 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 Gregor | b11f945 | 2012-03-26 16:54:18 +0000 | [diff] [blame] | 24 | } |