[all-commits] [llvm/llvm-project] ece444: [clang] Fix potential constant expression checking...

Eli Friedman via All-commits all-commits at lists.llvm.org
Mon Jul 28 02:00:10 PDT 2025


  Branch: refs/heads/release/21.x
  Home:   https://github.com/llvm/llvm-project
  Commit: ece444008ab4bfdb29f39ddc84469972b2e4d563
      https://github.com/llvm/llvm-project/commit/ece444008ab4bfdb29f39ddc84469972b2e4d563
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2025-07-28 (Mon, 28 Jul 2025)

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/SemaCXX/constant-expression-p2280r4.cpp
    M clang/test/SemaCXX/constexpr-never-constant.cpp

  Log Message:
  -----------
  [clang] Fix potential constant expression checking with constexpr-unknown.

071765749a70b22fb62f2efc07a3f242ff5b4c52 improved constexpr-unknown
diagnostics, but potential constant expression checking broke in the
process: we produce diagnostics in more cases. Suppress the diagnostics
as appropriate.

This fix affects -Winvalid-constexpr and the enable_if attribute. (The
-Winvalid-constexpr diagnostic isn't really important right now, but it
will become important if we allow constexpr-unknown with pre-C++23
standards.)

Fixes #149041.  Fixes #149188.
(cherry picked from commit 6a60f18997d62b0e2842a921fcb6beb3e52ed823)



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