From d829eab92b1159a427df7c9cd4ca0f77abf79196 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 26 Mar 2010 05:57:46 +0000 Subject: [PATCH] Add tests for PR6707. llvm-svn: 99613 --- .../CXX/temp/temp.fct.spec/temp.deduct/p9.cpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/clang/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp b/clang/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp index 634da7d1c267..c27261c96b68 100644 --- a/clang/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp +++ b/clang/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp @@ -4,3 +4,23 @@ template int f(int); // expected-note 2{{candidate}} template int f(int); // expected-note 2{{candidate}} int i1 = f<1>(0); // expected-error{{ambiguous}} int i2 = f<1000>(0); // expected-error{{ambiguous}} + +namespace PR6707 { + template + struct X { }; + + template + void f(X); + + void g(X x) { + f(x); + } + + static const unsigned char ten = 10; + template + void f2(X, X); + + void g2() { + f2(X(), X()); + } +}