llvm-project
36763294 - [Clang][Parser] Accept contextual _except in MS compatibility mode (#223551)

Commit
34 days ago
[Clang][Parser] Accept contextual _except in MS compatibility mode (#223551) Clang already accepts _try, _finally, and _leave under -fms-compatibility, but rejects the corresponding _except spelling because __except is recognized contextually by the parser rather than as a reserved token. This patch extends the contextual handler check to accept _except in Microsoft compatibility mode and uses that check consistently in SEH and C++ try-handler parsing. _except remains an ordinary identifier outside the handler position, and -fms-extensions alone does not enable the alias. The change is limited to parsing; it does not modify SEH lowering, LLVM IR, optimization, or runtime behavior. Assisted-by: Claude Opus 5 (via VS Code) --------- Co-authored-by: Adam Glass <adamglass@microsoft.com>
Author
Parents
Loading