15 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 4// Ensure that when enforcing access control an unqualified template name with5// explicit template arguments, we don't lose the context of the name lookup6// because of the required early lookup to determine if it names a template.7namespace PR7163 {8 template <typename R, typename P> void h(R (*func)(P)) {}9 class C {10 template <typename T> static void g(T*) {};11 public:12 void f() { h(g<int>); }13 };14}15