[all-commits] [llvm/llvm-project] 81b20e: [libc++] Work around new GCC 15 type_traits builti...

Roland McGrath via All-commits all-commits at lists.llvm.org
Tue May 13 12:24:11 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 81b20e110b3ffeb6d7069e7fe3e6339e63f8c03d
      https://github.com/llvm/llvm-project/commit/81b20e110b3ffeb6d7069e7fe3e6339e63f8c03d
  Author: Roland McGrath <mcgrathr at google.com>
  Date:   2025-05-13 (Tue, 13 May 2025)

  Changed paths:
    M libcxx/include/__type_traits/add_lvalue_reference.h
    M libcxx/include/__type_traits/add_pointer.h
    M libcxx/include/__type_traits/add_rvalue_reference.h
    M libcxx/include/__type_traits/decay.h
    M libcxx/include/__type_traits/remove_all_extents.h
    M libcxx/include/__type_traits/remove_extent.h

  Log Message:
  -----------
  [libc++] Work around new GCC 15 type_traits builtins that can't be used as Clang's can (#137871)

GCC 15 has added builtins for various C++ type traits that Clang
already had.  Since `__has_builtin(...)` now finds these, the #if
branches previously only used for Clang are now used for GCC 15.
However, GCC 15 requires that these builtins only be used in type
aliases, not in template aliases.

For now, just don't use the `__has_builtin(...)` branches under newer
GCC versions, so both 14 and 15 work during the transition.  This
can be cleaned up later to use all the GCC 15 builtins available.

Fixed: #137704
Fixed: #117319



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