p2-template-id.cpp 354 B

12345678910111213141516171819202122232425262728
  1. // RUN: %clang_cc1 -fsyntax-only -verify %s
  2. // expected-no-diagnostics
  3. namespace N1 {
  4. struct X { };
  5. int& f(void*);
  6. }
  7. namespace N2 {
  8. template<typename T> struct Y { };
  9. }
  10. namespace N3 {
  11. void test() {
  12. int &ir = f((N2::Y<N1::X>*)0);
  13. }
  14. }
  15. int g(void *);
  16. long g(N1::X);
  17. namespace N1 {
  18. void h(int (*)(void *));
  19. }
  20. void test() {
  21. h((&g));
  22. }