[PATCH] D76038: PR45000: Use Sema::SetParamDefaultArgument in TransformLambdaExpr

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 19:47:31 PDT 2020


aaronpuchert created this revision.
aaronpuchert added a reviewer: rsmith.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

We have to properly initialize from the given initialization expression
to make types match.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76038

Files:
  clang/lib/Sema/TreeTransform.h


Index: clang/lib/Sema/TreeTransform.h
===================================================================
--- clang/lib/Sema/TreeTransform.h
+++ clang/lib/Sema/TreeTransform.h
@@ -11882,7 +11882,7 @@
           Sema::ExpressionEvaluationContext::PotentiallyEvaluatedIfUsed, P);
       ExprResult R = getDerived().TransformExpr(
           E->getCallOperator()->getParamDecl(I)->getDefaultArg());
-      P->setDefaultArg(R.get());
+      getSema().SetParamDefaultArgument(P, R.get(), R.get()->getBeginLoc());
     }
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76038.249815.patch
Type: text/x-patch
Size: 522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200312/630593a4/attachment.bin>


More information about the cfe-commits mailing list