[all-commits] [llvm/llvm-project] 42d49a: [clang] Reject constexpr-unknown values as constan...

Eli Friedman via All-commits all-commits at lists.llvm.org
Sun Mar 9 18:39:16 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 42d49a77241df73a17cb442973702fc460e7fb90
      https://github.com/llvm/llvm-project/commit/42d49a77241df73a17cb442973702fc460e7fb90
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2025-03-09 (Sun, 09 Mar 2025)

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/CodeGenCXX/cxx23-p2280r4.cpp
    M clang/test/SemaCXX/constant-expression-cxx11.cpp
    M clang/test/SemaCXX/constant-expression-p2280r4.cpp

  Log Message:
  -----------
  [clang] Reject constexpr-unknown values as constant expressions more consistently (#129952)

Perform the check for constexpr-unknown values in the same place we
perform checks for other values which don't count as constant
expressions.

While I'm here, also fix a rejects-valid with a reference that doesn't
have an initializer. This diagnostic was also covering up some of the
bugs here.

The existing behavior with -fexperimental-new-constant-interpreter seems
to be correct, but the diagnostics are slightly different; it would be
helpful if someone could check on that as a followup.

Followup to #128409.

Fixes #129844. Fixes #129845.



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