diff options
author | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2024-08-29 12:37:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-29 12:37:56 +0800 |
commit | 55cdb3c785ad688054493bb82c0cf3b9d7ccea07 (patch) | |
tree | bb5fa8697d82745c50bd74866e9bc4dbaedc4c64 /clang/lib/Sema/MultiplexExternalSemaSource.cpp | |
parent | 8bf69ceb00bb56dd5c7357f192846518a6893f3c (diff) | |
download | llvm-55cdb3c785ad688054493bb82c0cf3b9d7ccea07.zip llvm-55cdb3c785ad688054493bb82c0cf3b9d7ccea07.tar.gz llvm-55cdb3c785ad688054493bb82c0cf3b9d7ccea07.tar.bz2 |
[C++20] [Modules] Merge lambdas in source to imported lambdas (#106483)
Close https://github.com/llvm/llvm-project/issues/102721
Generally, the type of merged decls will be reused in ASTContext. But
for lambda, in the import and then include case, we can't decide its
previous decl in the imported modules so that we can't assign the
previous decl before creating the type for it. Since we can't decide its
numbering before creating it. So we have to assign the previous decl and
the canonical type for it after creating it, which is unusual and
slightly hack.
Diffstat (limited to 'clang/lib/Sema/MultiplexExternalSemaSource.cpp')
-rw-r--r-- | clang/lib/Sema/MultiplexExternalSemaSource.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/MultiplexExternalSemaSource.cpp b/clang/lib/Sema/MultiplexExternalSemaSource.cpp index 79e656e..cd44483 100644 --- a/clang/lib/Sema/MultiplexExternalSemaSource.cpp +++ b/clang/lib/Sema/MultiplexExternalSemaSource.cpp @@ -343,7 +343,7 @@ bool MultiplexExternalSemaSource::MaybeDiagnoseMissingCompleteType( } void MultiplexExternalSemaSource::AssignedLambdaNumbering( - const CXXRecordDecl *Lambda) { + CXXRecordDecl *Lambda) { for (auto *Source : Sources) Source->AssignedLambdaNumbering(Lambda); } |