[all-commits] [llvm/llvm-project] b6259e: [Clang] Export CanPassInRegisters as a type trait

Roy Jacobson via All-commits all-commits at lists.llvm.org
Mon Feb 13 09:16:38 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6259eca16f6c923d87a1ca1d424931e37d6871a
      https://github.com/llvm/llvm-project/commit/b6259eca16f6c923d87a1ca1d424931e37d6871a
  Author: Roy Jacobson <roi.jacobson1 at gmail.com>
  Date:   2023-02-13 (Mon, 13 Feb 2023)

  Changed paths:
    M clang/docs/LanguageExtensions.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Basic/TokenKinds.def
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/test/SemaCXX/type-traits.cpp

  Log Message:
  -----------
  [Clang] Export CanPassInRegisters as a type trait

While working on D140664, I thought it would be nice to be able to write tests
for parameter passing ABI. Currently we test this by dumping the AST and
matching the results which makes it hard to write new tests.
Adding this builtin will allow writing better ABI tests which
can help improve our coverage in this area.

While less useful, maybe some users would also find it useful for asserting
against pessimisations for their classes.

Reviewed By: erichkeane

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




More information about the All-commits mailing list