[all-commits] [llvm/llvm-project] 367632: [Clang][Parser] Accept contextual _except in MS co...

Yassine Missoum via All-commits all-commits at lists.llvm.org
Thu Sep 17 08:52:35 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 36763294ef639d8a6a4379d81da653dda1c20686
      https://github.com/llvm/llvm-project/commit/36763294ef639d8a6a4379d81da653dda1c20686
  Author: Yassine Missoum <mmissoum at microsoft.com>
  Date:   2026-09-17 (Thu, 17 Sep 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.md
    M clang/include/clang/Parse/Parser.h
    M clang/lib/Parse/ParseStmt.cpp
    M clang/lib/Parse/Parser.cpp
    A clang/test/Parser/ms-seh-single-underscore-strict.c
    A clang/test/Parser/ms-seh-single-underscore.c

  Log Message:
  -----------
  [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 at microsoft.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list