[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 26 08:20:51 PDT 2024


================
@@ -8270,6 +8303,15 @@ TreeTransform<Derived>::TransformDeclStmt(DeclStmt *S) {
     if (Transformed != D)
       DeclChanged = true;
 
+    if (LSI && isa<TypeDecl>(Transformed))
+      LSI->ContainsUnexpandedParameterPack |=
+          getSema()
+              .getASTContext()
+              .getTypeDeclType(cast<TypeDecl>(Transformed))
+              .getCanonicalType()
+              .getTypePtr()
+              ->containsUnexpandedParameterPack();
+
----------------
zyn0217 wrote:

I didn't think of any other case that owns an unexpanded flag, handling TypeDecls + Exprs is probably sufficient at this point.


https://github.com/llvm/llvm-project/pull/86265


More information about the cfe-commits mailing list