[all-commits] [llvm/llvm-project] 292a28: [libc++] Enable availability based on the compiler...

Louis Dionne via All-commits all-commits at lists.llvm.org
Thu Mar 7 12:12:44 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 292a28df6c55679fad0589dea35278a8c66b2ae1
      https://github.com/llvm/llvm-project/commit/292a28df6c55679fad0589dea35278a8c66b2ae1
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2024-03-07 (Thu, 07 Mar 2024)

  Changed paths:
    M libcxx/include/__availability
    A libcxx/test/libcxx/vendor/apple/availability-with-pedantic-errors.compile.pass.cpp

  Log Message:
  -----------
  [libc++] Enable availability based on the compiler instead of __has_extension (#84065)

__has_extension(...) doesn't work as intended when -pedantic-errors is
used with Clang. With that flag, __has_extension(...) is equivalent to
__has_feature(...), which means that checks like

    __has_extension(pragma_clang_attribute_external_declaration)

will return 0. In turn, this has the effect of disabling availability
markup in libc++, which is undesirable.

rdar://124078119



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