xref: /aosp_15_r20/external/clang/test/CXX/temp/temp.names/p2.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify %s
2*67e74705SXin Li // expected-no-diagnostics
3*67e74705SXin Li 
4*67e74705SXin Li // Ensure that when enforcing access control an unqualified template name with
5*67e74705SXin Li // explicit template arguments, we don't lose the context of the name lookup
6*67e74705SXin Li // because of the required early lookup to determine if it names a template.
7*67e74705SXin Li namespace PR7163 {
h(R (* func)(P))8*67e74705SXin Li   template <typename R, typename P> void h(R (*func)(P)) {}
9*67e74705SXin Li   class C {
g(T *)10*67e74705SXin Li     template <typename T> static void g(T*) {};
11*67e74705SXin Li    public:
f()12*67e74705SXin Li     void f() { h(g<int>); }
13*67e74705SXin Li   };
14*67e74705SXin Li }
15