[all-commits] [llvm/llvm-project] f2d2c9: [clang] Remove separate evaluation step for static...
Eli Friedman via All-commits
all-commits at lists.llvm.org
Tue Jun 17 16:44:16 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f2d2c99866dfd133e7b9c98b1d4983c6bce33d67
https://github.com/llvm/llvm-project/commit/f2d2c99866dfd133e7b9c98b1d4983c6bce33d67
Author: Eli Friedman <efriedma at quicinc.com>
Date: 2025-06-17 (Tue, 17 Jun 2025)
Changed paths:
M clang/lib/Sema/SemaDecl.cpp
M clang/test/SemaCXX/builtin-is-constant-evaluated.cpp
M clang/test/SemaCXX/class.cpp
M clang/test/SemaCXX/cxx0x-class.cpp
M clang/test/SemaCXX/cxx2a-consteval.cpp
M clang/test/SemaTemplate/instantiate-static-var.cpp
Log Message:
-----------
[clang] Remove separate evaluation step for static class member init. (#142713)
We already evaluate the initializers for all global variables, as
required by the standard. Leverage that evaluation instead of trying to
separately validate static class members.
This has a few benefits:
- Improved diagnostics; we now get notes explaining what failed to
evaluate.
- Improved correctness: is_constant_evaluated is handled correctly.
The behavior follows the proposed resolution for CWG1721.
Fixes #88462. Fixes #99680.
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