[all-commits] [llvm/llvm-project] a3d8b7: [Clang][CodeGen] Mark `__dynamic_cast` as `willret...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Sat Feb 3 19:32:01 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a3d8b78333b80b47209ad0dc8f8159d70c7fcb39
      https://github.com/llvm/llvm-project/commit/a3d8b78333b80b47209ad0dc8f8159d70c7fcb39
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-02-04 (Sun, 04 Feb 2024)

  Changed paths:
    M clang/lib/CodeGen/ItaniumCXXABI.cpp
    M clang/test/CodeGenCXX/dynamic-cast-address-space.cpp
    A clang/test/CodeGenCXX/dynamic-cast-dead.cpp
    M clang/test/CodeGenCXX/dynamic-cast.cpp

  Log Message:
  -----------
  [Clang][CodeGen] Mark `__dynamic_cast` as `willreturn` (#80409)

According to the C++ standard, `dynamic_cast` of pointers either returns
a pointer (7.6.1.7) or results in undefined behavior (11.9.5). This
patch marks `__dynamic_cast` as `willreturn` to remove unused calls.

Fixes #77606.




More information about the All-commits mailing list