[all-commits] [llvm/llvm-project] 967834: [clang][c23] Avoid assertion on an invalid static ...

Mariya Podchishchaeva via All-commits all-commits at lists.llvm.org
Thu Jan 15 01:48:06 PST 2026


  Branch: refs/heads/release/22.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 967834a63c0f2c35f974c202aaf0157be253dfc5
      https://github.com/llvm/llvm-project/commit/967834a63c0f2c35f974c202aaf0157be253dfc5
  Author: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
  Date:   2026-01-15 (Thu, 15 Jan 2026)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/Sema/constexpr.c

  Log Message:
  -----------
  [clang][c23] Avoid assertion on an invalid static constexpr variable (#175927)

In C static variables should have constant expressions in initializers
so we were checking this twice for constexpr variables and failing with
an assertion that was makes sure we don't do it.
This patch postpones the check just like it is done for file
scope constexpr variables in C already.

Fixes https://github.com/llvm/llvm-project/issues/173605

(cherry picked from commit 5b0270cb72f707f55e2ff5e97fc938afb3b81053)



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