xref: /aosp_15_r20/external/clang/test/SemaCXX/PR8755.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify %s
2*67e74705SXin Li 
3*67e74705SXin Li template <typename T>
4*67e74705SXin Li struct A {
5*67e74705SXin Li   typedef int iterator;  // expected-note{{declared here}}
6*67e74705SXin Li };
7*67e74705SXin Li 
8*67e74705SXin Li template <typename T>
f()9*67e74705SXin Li void f() {
10*67e74705SXin Li   class A <T> ::iterator foo;  // expected-error{{elaborated type refers to a typedef}}
11*67e74705SXin Li }
12*67e74705SXin Li 
g()13*67e74705SXin Li void g() {
14*67e74705SXin Li   f<int>();  // expected-note{{in instantiation of function template}}
15*67e74705SXin Li }
16*67e74705SXin Li 
17