[all-commits] [llvm/llvm-project] c4adc4: [SEH] Fix regression with SEH in noexpect functions

Olivier Goffart via All-commits all-commits at lists.llvm.org
Fri May 7 13:28:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c4adc49a1c988e6ea8a340b6245525ef5599812c
      https://github.com/llvm/llvm-project/commit/c4adc49a1c988e6ea8a340b6245525ef5599812c
  Author: Olivier Goffart <ogoffart at woboq.com>
  Date:   2021-05-07 (Fri, 07 May 2021)

  Changed paths:
    M clang/lib/CodeGen/CGException.cpp
    M clang/lib/CodeGen/CGExpr.cpp
    M clang/test/CodeGenCXX/exceptions-seh.cpp

  Log Message:
  -----------
  [SEH] Fix regression with SEH in noexpect functions

Commit 5baea0560160a693b19022c5d0ba637b6b46b2d8 set the CurCodeDecl
because it was needed to pass the assert in CodeGenFunction::EmitLValueForLambdaField,
But this was not right to do as CodeGenFunction::FinishFunction passes it to EmitEndEHSpec
and cause corruption of the EHStack.

Revert the part of the commit that changes the CurCodeDecl, and instead
adjust the assert to check for a null CurCodeDecl.

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




More information about the All-commits mailing list