"Reapply "GH58368: Correct concept checking in a lambda defined in concept""
authorErich Keane <erich.keane@intel.com>
Mon, 24 Oct 2022 19:20:36 +0000 (12:20 -0700)
committerErich Keane <erich.keane@intel.com>
Mon, 24 Oct 2022 19:36:54 +0000 (12:36 -0700)
commit975740bf8db92e054b95a7cedd646d7bc3f74fed
treec6d0ebbc3a77934fd0564ef760d4456d5c953186
parent18066b52c2e2676438676cb069cf882e609288fe
"Reapply "GH58368: Correct concept checking in a lambda defined in concept""

This reverts commit cecc9a92cfca71c1b6c2a35c5e302ab649496d11.

The problem ended up being how we were handling the lambda-context in
code generation: we were assuming any decl context here would be a
named-decl, but that isn't the case.  Instead, we just replace it with
the concept's owning context.

Differential Revision: https://reviews.llvm.org/D136451
26 files changed:
clang/include/clang/AST/ASTNodeTraverser.h
clang/include/clang/AST/DeclTemplate.h
clang/include/clang/AST/ExprConcepts.h
clang/include/clang/AST/RecursiveASTVisitor.h
clang/include/clang/Basic/DeclNodes.td
clang/include/clang/Serialization/ASTBitCodes.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/Decl.cpp
clang/lib/AST/DeclBase.cpp
clang/lib/AST/DeclTemplate.cpp
clang/lib/AST/ExprConcepts.cpp
clang/lib/CodeGen/CGDecl.cpp
clang/lib/Sema/SemaConcept.cpp
clang/lib/Sema/SemaLambda.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/lib/Sema/SemaTemplateInstantiate.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/lib/Sema/TreeTransform.h
clang/lib/Serialization/ASTCommon.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTReaderStmt.cpp
clang/lib/Serialization/ASTWriterDecl.cpp
clang/lib/Serialization/ASTWriterStmt.cpp
clang/test/AST/ast-dump-concepts.cpp
clang/test/SemaTemplate/concepts-lambda.cpp
clang/tools/libclang/CIndex.cpp