Author: Matheus Izvekov Date: 2026-05-28T02:59:02Z New Revision: a20e85f74d7a3f1bc29cb80fa6d47cf74e9f2aa0
URL: https://github.com/llvm/llvm-project/commit/a20e85f74d7a3f1bc29cb80fa6d47cf74e9f2aa0 DIFF: https://github.com/llvm/llvm-project/commit/a20e85f74d7a3f1bc29cb80fa6d47cf74e9f2aa0.diff LOG: [clang] NFC: add test cases from #111561 (#200105) This adds those test cases while #111561 gathers dust. Added: clang/test/CXX/basic/basic.link/p11.cpp Modified: Removed: ################################################################################ diff --git a/clang/test/CXX/basic/basic.link/p11.cpp b/clang/test/CXX/basic/basic.link/p11.cpp new file mode 100644 index 0000000000000..7f6a88d4a63f1 --- /dev/null +++ b/clang/test/CXX/basic/basic.link/p11.cpp @@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -std=c++26 -fsyntax-only -verify %s + +namespace MemberSpecialization { + template<typename T> + struct A { + template<bool B> + void f() noexcept(B); + // FIXME expected-note@-1 {{previous declaration is here}} + + template<bool B> + void g() noexcept(B); // expected-note {{previous declaration is here}} + }; + + template<> + template<bool B> + void A<int>::f() noexcept(B); + // FIXME expected-error@-1 {{exception specification in declaration does not match previous declaration}} + + template<> + template<bool B> + void A<int>::g() noexcept(!B); // expected-error {{exception specification in declaration does not match previous declaration}} +} + +namespace Friend { + template<bool B> + void f() noexcept(B); + // FIXME expected-note@-1 {{previous declaration is here}} + + template<bool B> + void g() noexcept(B); // expected-note {{previous declaration is here}} + + template<typename T> + struct A { + template<bool B> + friend void f() noexcept(B); + // FIXME expected-error@-1 {{exception specification in declaration does not match previous declaration}} + + template<bool B> + friend void g() noexcept(!B); // expected-error {{exception specification in declaration does not match previous declaration}} + }; +} _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
