From 486754660bb926339aefcf012a3f848592babb8b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 28 Jul 2018 11:06:01 +0000 Subject: Vendor import of clang trunk r338150: https://llvm.org/svn/llvm-project/cfe/trunk@338150 --- .../ms-function-specialization-class-scope.cpp | 24 ++++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'test/SemaTemplate/ms-function-specialization-class-scope.cpp') diff --git a/test/SemaTemplate/ms-function-specialization-class-scope.cpp b/test/SemaTemplate/ms-function-specialization-class-scope.cpp index 3c7111d058389..dcab9bfaeabcb 100644 --- a/test/SemaTemplate/ms-function-specialization-class-scope.cpp +++ b/test/SemaTemplate/ms-function-specialization-class-scope.cpp @@ -1,18 +1,15 @@ // RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify %s // RUN: %clang_cc1 -fms-extensions -fdelayed-template-parsing -fsyntax-only -verify %s +// expected-no-diagnostics class A { public: template A(U p) {} - template<> A(int p) { - // expected-warning@-1 {{explicit specialization of 'A' within class scope is a Microsoft extension}} - } + template<> A(int p) {} template void f(U p) {} - template<> void f(int p) { - // expected-warning@-1 {{explicit specialization of 'f' within class scope is a Microsoft extension}} - } + template<> void f(int p) {} void f(int p) {} }; @@ -28,14 +25,11 @@ void test1() { template class B { public: template B(U p) {} - template<> B(int p) { - // expected-warning@-1 {{explicit specialization of 'B' within class scope is a Microsoft extension}} - } + template<> B(int p) {} template void f(U p) { T y = 9; } template<> void f(int p) { - // expected-warning@-1 {{explicit specialization of 'f' within class scope is a Microsoft extension}} T a = 3; } @@ -56,9 +50,7 @@ namespace PR12709 { template void specialized_member_template() {} - template<> void specialized_member_template() { - // expected-warning@-1 {{explicit specialization of 'specialized_member_template' within class scope is a Microsoft extension}} - } + template<> void specialized_member_template() {} }; void f() { TemplateClass t; } @@ -67,8 +59,8 @@ namespace PR12709 { namespace Duplicates { template struct A { template void f(); - template<> void f() {} // expected-warning {{Microsoft extension}} - template<> void f() {} // expected-warning {{Microsoft extension}} + template<> void f() {} + template<> void f() {} }; // FIXME: We should diagnose the duplicate explicit specialization definitions @@ -81,6 +73,6 @@ struct S { template int f(int = 0); template <> - int f<0>(int); // expected-warning {{Microsoft extension}} + int f<0>(int); }; } -- cgit v1.2.3