[all-commits] [llvm/llvm-project] ebcf03: [analyzer] Engine: fix crash with SEH __leave keyword

AbbasSabraCpp via All-commits all-commits at lists.llvm.org
Mon May 17 11:12:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ebcf030efc5ef149e423f8fa2ca705b590a129ed
      https://github.com/llvm/llvm-project/commit/ebcf030efc5ef149e423f8fa2ca705b590a129ed
  Author: Abbas Sabra <Abbassabracpp at gmail.com>
  Date:   2021-05-17 (Mon, 17 May 2021)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
    A clang/test/Analysis/ms-seh.cpp

  Log Message:
  -----------
  [analyzer] Engine: fix crash with SEH __leave keyword

MSVC has a `try-except` statement.
This statement could containt a `__leave` keyword, which is similar to
`goto` to the end of the try block. The semantic of this keyword is not
implemented.

We should at least parse such code without crashing.

https://docs.microsoft.com/en-us/cpp/cpp/try-except-statement?view=msvc-160

Patch By: AbbasSabra!

Reviewed By: steakhal

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




More information about the All-commits mailing list