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.param/p12.cpp | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 clang/test/CXX/temp/temp.param/p12.cpp (limited to 'clang/test/CXX/temp/temp.param/p12.cpp') diff --git a/clang/test/CXX/temp/temp.param/p12.cpp b/clang/test/CXX/temp/temp.param/p12.cpp new file mode 100644 index 0000000..7be3879 --- /dev/null +++ b/clang/test/CXX/temp/temp.param/p12.cpp @@ -0,0 +1,39 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +template struct Y1; // expected-note{{too few template parameters in template template argument}} +template struct Y2; + +// C++ [temp.param]p12: +template // expected-note{{previous default template argument defined here}} + class B3; +template class B3; +template // expected-error{{template parameter redefines default argument}} + class B3; + +template class, + template class = Y1> // expected-note{{previous default template argument defined here}} + class B3t; + +template class, template class> class B3t; + +template class, + template class = Y1> // expected-error{{template parameter redefines default argument}} + class B3t; + +template // expected-note{{previous default template argument defined here}} + class B3n; + +template class B3n; + +template // expected-error{{template parameter redefines default argument}} + class B3n; + +// Check validity of default arguments +template class // expected-note{{previous template template parameter is here}} + = Y1> // expected-error{{template template argument has different template parameters than its corresponding template template parameter}} + class C1 {}; + +C1<> c1; // expected-note{{while checking a default template argument}} -- cgit v1.2.3