[all-commits] [llvm/llvm-project] 0fcb26: [clang] Fix __try/__finally blocks in C++ construc...

Eli Friedman via All-commits all-commits at lists.llvm.org
Wed Nov 16 15:15:28 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0fcb26c5b6487bf9b31670122f8c931ac020bb34
      https://github.com/llvm/llvm-project/commit/0fcb26c5b6487bf9b31670122f8c931ac020bb34
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    M clang/include/clang/AST/Mangle.h
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/AST/MicrosoftMangle.cpp
    M clang/lib/CodeGen/CGException.cpp
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/test/CodeGenCXX/exceptions-seh.cpp

  Log Message:
  -----------
  [clang] Fix __try/__finally blocks in C++ constructors.

We were crashing trying to convert a GlobalDecl from a
CXXConstructorDecl.  Instead of trying to do that conversion, just pass
down the original GlobalDecl.

I think we could actually compute the correct constructor/destructor
kind from the context, given the way Microsoft mangling works, but it's
simpler to just pass through the correct constructor/destructor kind.

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




More information about the All-commits mailing list