ilya-biryukov added inline comments.

================
Comment at: clang/lib/Sema/TreeTransform.h:13156
           getSema().buildLambdaInitCaptureInitialization(
-              C->getLocation(), OldVD->getType()->isReferenceType(),
+              C->getLocation(), isReferenceType,
               EllipsisLoc, NumExpansions, OldVD->getIdentifier(),
----------------
Could we use `C->getCaptureKind() == LCK_ByRef` instead?

It seems like that was the intention of the function in the first place (that's 
was the other callsite from the parser is doing): pass what was written by the 
user and let the function figure out how to actually build the types.
Normally we want to unify the code that parser uses for non-dependent code and 
the tree-transforms where possible.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139125/new/

https://reviews.llvm.org/D139125

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to