[all-commits] [llvm/llvm-project] d56ce3: [Clang] Non-polymorphic trivially relocatable type...

Corentin Jabot via All-commits all-commits at lists.llvm.org
Mon Jun 9 22:30:28 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d56ce312d0c2e5ae74476977a8952dbb3ba4c513
      https://github.com/llvm/llvm-project/commit/d56ce312d0c2e5ae74476977a8952dbb3ba4c513
  Author: Corentin Jabot <corentinjabot at gmail.com>
  Date:   2025-06-10 (Tue, 10 Jun 2025)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaTypeTraits.cpp
    M clang/test/SemaCXX/attr-trivial-abi.cpp
    M clang/test/SemaObjCXX/attr-trivial-abi.mm

  Log Message:
  -----------
  [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (#143111)

Use the definition of trivially relocatable types to short-circuit some
checks for trivial_abi.

Note that this is mostly a no-op as there is a lot of overlap between
trivial_abi and trivial relocatability (ie, I can't envision a scenario
in which there would be a trivially relocatable type that would not be
eligible for trivial_abi based on its special member function... which
is good!)

Note that for bases and members, we need to check CanPassInRegister
rather than just relocation. So we do these checks first, which leads to
better diagnostics.



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