This is an archive of the discontinued LLVM Phabricator instance.

[Windows SEH] Fix ehcleanup crash for Windows -EHa
ClosedPublic

Authored by pengfei on Apr 8 2023, 5:20 PM.

Details

Diff Detail

Event Timeline

pengfei created this revision.Apr 8 2023, 5:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2023, 5:20 PM
pengfei requested review of this revision.Apr 8 2023, 5:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2023, 5:20 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
efriedma accepted this revision.Apr 11 2023, 3:35 PM

LGTM

clang/test/CodeGen/windows-seh-EHa-CppCatchReturn.cpp
27

If a scope never ends because there's an "unreachable", that's fine, I think. The scope never dynamically ends (unless an exception is thrown). The backend deals with the same sort of thing for other constructs with a "begin" and "end". For example, a cleanuppad might not have a matching cleanupret.

This revision is now accepted and ready to land.Apr 11 2023, 3:35 PM
pengfei added inline comments.Apr 11 2023, 11:44 PM
clang/test/CodeGen/windows-seh-EHa-CppCatchReturn.cpp
27

Thanks for the advice!

This revision was automatically updated to reflect the committed changes.