Improve requirement clause limitation on non templated function
authorErich Keane <erich.keane@intel.com>
Tue, 28 Mar 2023 18:12:50 +0000 (11:12 -0700)
committerErich Keane <erich.keane@intel.com>
Wed, 29 Mar 2023 13:27:25 +0000 (06:27 -0700)
commit4444eeb753e5b7918141b830213cd3eae0c1fd75
treeb564c51c9872f16280f2222a6833b5d1276cb271
parentc4861e32ed9096e5f737bc938073077ce279dbcc
Improve requirement clause limitation on non templated function

The current implementation 6da3d66f03f9162ef341cc67218be40e22fe9808
got a few things wrong, particularly that a template, or  definition
or member in a templated entity is required to be allowed to have a
trailing requires clause.

This patch corrects this, as reproted by #61748

Fixes: #61748

Differential Revision: https://reviews.llvm.org/D147070
clang/docs/ReleaseNotes.rst
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaLambda.cpp
clang/test/CXX/dcl.decl/dcl.decl.general/p4-20.cpp
clang/test/Parser/cxx2b-lambdas.cpp
clang/test/SemaCXX/lambda-capture-type-deduction.cpp