[PATCH] D134874: [Concepts] Fix Concepts on generic lambda in a VarTemplateSpecDecl
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 29 06:11:27 PDT 2022
erichkeane created this revision.
erichkeane added reviewers: tahonermann, shafik.
Herald added a project: All.
erichkeane requested review of this revision.
As fallout of the Deferred Concept Instantiation patch (babdef27c5 <https://reviews.llvm.org/rGbabdef27c503c0bbbcc017e9f88affddda90ea4e>), we
got a number of reports of a regression, where we asserted when
instantiating a constraint on a generic lambda inside of a variable
template. See: https://github.com/llvm/llvm-project/issues/57958
The problem was that getTemplateInstantiationArgs function only walked
up declaration contexts, and missed that this is not necessarily the
case with a lambda (which can ALSO be in a separate context).
This patch refactors the getTemplateInstantiationArgs function in a way
that is hopefully more readable, and fixes the problem with the concepts
on a generic lambda.
https://reviews.llvm.org/D134874
Files:
clang/include/clang/AST/DeclBase.h
clang/include/clang/Sema/Sema.h
clang/lib/AST/DeclBase.cpp
clang/lib/Sema/SemaConcept.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/lib/Sema/SemaTemplateInstantiate.cpp
clang/test/SemaTemplate/concepts-lambda.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134874.463861.patch
Type: text/x-patch
Size: 23392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220929/e0a7bbe6/attachment-0001.bin>
More information about the cfe-commits
mailing list