[PATCH] D113620: Skip exception cleanups when the innermost scope is EHTerminateScope.

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 10 14:46:21 PST 2021


jyknight created this revision.
jyknight added reviewers: rsmith, aaron.ballman.
jyknight requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.

EHTerminateScope is used to implement C++ noexcept semantics, and per
C++ [except.terminate], it is implemented-defined whether no, some, or
all cleanups are run prior to terminate.

We now define the behavior as "some" -- cleanups in nested function
calls will still be run, but not those in the noexcept function
itself.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113620

Files:
  clang/lib/CodeGen/CGCleanup.cpp
  clang/test/CodeGenCXX/noexcept.cpp
  clang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
  clang/test/OpenMP/openmp_win_codegen.cpp
  clang/test/OpenMP/ordered_doacross_codegen.cpp
  clang/test/OpenMP/parallel_master_codegen.cpp
  clang/test/OpenMP/single_codegen.cpp
  clang/test/OpenMP/taskgroup_codegen.cpp
  clang/test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp
  clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113620.386327.patch
Type: text/x-patch
Size: 299605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211110/fff06f13/attachment-0001.bin>


More information about the cfe-commits mailing list