From 77212133072dc40f070a280af8217032f55a9eb4 Mon Sep 17 00:00:00 2001 From: rdivacky Date: Tue, 15 Dec 2009 18:49:47 +0000 Subject: Update clang to 91430. --- test/SemaTemplate/instantiate-using-decl.cpp | 63 ++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 17 deletions(-) (limited to 'test/SemaTemplate/instantiate-using-decl.cpp') diff --git a/test/SemaTemplate/instantiate-using-decl.cpp b/test/SemaTemplate/instantiate-using-decl.cpp index a1cf355..de66f79 100644 --- a/test/SemaTemplate/instantiate-using-decl.cpp +++ b/test/SemaTemplate/instantiate-using-decl.cpp @@ -1,20 +1,49 @@ // RUN: clang-cc -fsyntax-only -verify %s -namespace N { } - -template -struct A { - void f(); -}; - -template -struct B : A { - using A::f; - - void g() { - using namespace N; - f(); - } -}; +namespace test0 { + namespace N { } + + template + struct A { + void f(); + }; + + template + struct B : A { + using A::f; + + void g() { + using namespace N; + f(); + } + }; + + template struct B; +} -template struct B; +namespace test1 { + template struct Visitor1 { + void Visit(struct Object1*); + }; + template struct Visitor2 { + void Visit(struct Object2*); // expected-note {{candidate function}} + }; + + template struct JoinVisitor + : Visitor1, Visitor2 { + typedef Visitor1 Base1; + typedef Visitor2 Base2; + + void Visit(struct Object1*); // expected-note {{candidate function}} + using Base2::Visit; + }; + + class Knot : JoinVisitor { + }; + + void test() { + Knot().Visit((struct Object1*) 0); + Knot().Visit((struct Object2*) 0); + Knot().Visit((struct Object3*) 0); // expected-error {{no matching member function for call}} + } +} -- cgit v1.1