From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CXX/temp/temp.names/p2.cpp | 13 +++++++++++++ clang/test/CXX/temp/temp.names/p4.cpp | 15 +++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 clang/test/CXX/temp/temp.names/p2.cpp create mode 100644 clang/test/CXX/temp/temp.names/p4.cpp (limited to 'clang/test/CXX/temp/temp.names') diff --git a/clang/test/CXX/temp/temp.names/p2.cpp b/clang/test/CXX/temp/temp.names/p2.cpp new file mode 100644 index 0000000..93e45dd --- /dev/null +++ b/clang/test/CXX/temp/temp.names/p2.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// Ensure that when enforcing access control an unqualified template name with +// explicit template arguments, we don't lose the context of the name lookup +// because of the required early lookup to determine if it names a template. +namespace PR7163 { + template void h(R (*func)(P)) {} + class C { + template static void g(T*) {}; + public: + void f() { h(g); } + }; +} diff --git a/clang/test/CXX/temp/temp.names/p4.cpp b/clang/test/CXX/temp/temp.names/p4.cpp new file mode 100644 index 0000000..103a1bd --- /dev/null +++ b/clang/test/CXX/temp/temp.names/p4.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +struct meta { + template + struct apply { + typedef U* type; + }; +}; + +template +void f(typename T::template apply::type); + +void test_f(int *ip) { + f(ip); +} -- cgit v1.2.3