[all-commits] [llvm/llvm-project] 9124e9: [libc] Update assert for C23 (#137402)

Michael Jones via All-commits all-commits at lists.llvm.org
Mon Apr 28 12:07:14 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9124e963a3bf73fd7430a17535d638601be5630f
      https://github.com/llvm/llvm-project/commit/9124e963a3bf73fd7430a17535d638601be5630f
  Author: Michael Jones <michaelrj at google.com>
  Date:   2025-04-28 (Mon, 28 Apr 2025)

  Changed paths:
    M libc/include/assert.h.def

  Log Message:
  -----------
  [libc] Update assert for C23 (#137402)

Previously the assert macro took one argument named "e", but this led to
possible errors if the caller had commas in their input. C23 changed the
definition of assert to use `__VA_ARGS__` to ensure comma cases are
handled properly. This patch doesn't introduce the enforcement function
mentioned in the standard update, though that may be done in a followup.

Fixes #136184



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