diff options
author | Erich Keane <erich.keane@intel.com> | 2022-10-20 11:55:01 -0700 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2022-10-24 06:32:18 -0700 |
commit | b7c922607c5ba93db8b893d4ba461052af8317b5 (patch) | |
tree | 872159c338f6f5c014f5321d9b5231e534f528d2 /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | d84e4f0829c495452c7ac9f4a7725bde25653dde (diff) | |
download | llvm-b7c922607c5ba93db8b893d4ba461052af8317b5.zip llvm-b7c922607c5ba93db8b893d4ba461052af8317b5.tar.gz llvm-b7c922607c5ba93db8b893d4ba461052af8317b5.tar.bz2 |
GH58368: Correct concept checking in a lambda defined in concept
As that bug reports, the problem here is that the lambda's
'context-decl' was not set to the concept, and the lambda picked up
template arguments from the concept. SO, we failed to get the correct
template arguments in SemaTemplateInstantiate.
However, a Concept Specialization is NOT a decl, its an expression, so
we weren't able to put the concept in the decl tree like we needed.
This patch introduces a ConceptSpecializationDecl, which is the smallest
type possible to use for this purpose, containing only the template
arguments.
The net memory impliciation of this is turning a
trailing-objects into a pointer to a type with trailing-objects, so it
should be minor.
As future work, we may consider giving this type more responsibility, or
figuring out how to better merge duplicates, but as this is just a
template-argument collection at the moment, there isn't much value to
it.
Differential Revision: https://reviews.llvm.org/D136451
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions