From: Douglas Gregor Date: Tue, 28 Jul 2009 16:39:54 +0000 (+0000) Subject: Add a template test that requires canonical expression comparison X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8bda2e66fa8050a6b3eef745628873eef4b683d8;p=clang Add a template test that requires canonical expression comparison git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77325 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p6.cpp b/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p6.cpp new file mode 100644 index 0000000000..7606a2a6ee --- /dev/null +++ b/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p6.cpp @@ -0,0 +1,17 @@ +// RUN: clang-cc -fsyntax-only -verify %s +// XFAIL + +template +struct A0 { + void g0(); +}; + +template void f0(A0) { } // expected-note{{previous}} +template void f0(A0) { } +template void f0(A0) { } // expected-error{{redefinition}} + +template void f1(A0<0, (X + Y)>) { } // expected-note{{previous}} +template void f1(A0<0, (X - Y)>) { } +template void f1(A0<0, (A + B)>) { } // expected-error{{redefinition}} + +template void A0::g0() { }