[all-commits] [llvm/llvm-project] fd2ffc: [clang] Reject incomplete types in `__is_layout_co...

Vlad Serebrennikov via All-commits all-commits at lists.llvm.org
Mon Apr 8 11:38:10 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd2ffc1cbf51a75884369ec9253f47ae2fdba83c
      https://github.com/llvm/llvm-project/commit/fd2ffc1cbf51a75884369ec9253f47ae2fdba83c
  Author: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/test/SemaCXX/type-traits.cpp

  Log Message:
  -----------
  [clang] Reject incomplete types in `__is_layout_compatible()` (#87869)

This is a follow-up to #81506. As discussed in #87737, we're rejecting
incomplete types, save for exceptions listed in the C++ standard (`void`
and arrays of unknown bound). Note that arrays of unknown bound of
incomplete types are accepted.

Since we're happy with the current behavior of this intrinsic for
flexible array members
(https://github.com/llvm/llvm-project/pull/87737#discussion_r1553652570),
I added a couple of tests for that as well.



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