[all-commits] [llvm/llvm-project] e4dfc9: Fix the type of the capture passed to LambdaIntrod...

Akira Hatanaka via All-commits all-commits at lists.llvm.org
Mon Mar 9 12:25:57 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e4dfc9f5bda3171e159f2ff62390c8795d9497e7
      https://github.com/llvm/llvm-project/commit/e4dfc9f5bda3171e159f2ff62390c8795d9497e7
  Author: Akira Hatanaka <ahatanaka at apple.com>
  Date:   2020-03-09 (Mon, 09 Mar 2020)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/CodeGenObjCXX/block-nested-in-lambda.mm

  Log Message:
  -----------
  Fix the type of the capture passed to LambdaIntroducer::addCapture in
RebuildLambdaScopeInfo

Previously the type of the variable was being passed, which was causing
clang to crash when a non-reference variable was captured by reference
or a reference variable was captured by value by a lambda and a block
nested inside the lambda body was referencing the variable.

Original patch by JF Bastien.

rdar://problem/47550338

Differential Revision: https://reviews.llvm.org/D58164




More information about the All-commits mailing list