-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"constexprAnything related to constant evaluationAnything related to constant evaluationregression:21Regression in 21 releaseRegression in 21 releaserejects-valid
Description
In C++23/26 mode, Clang rejects the following function definition with -Winvalid-constexpr used, saying "constexpr function never produces a constant expression". Godbolt link.
constexpr bool fun(const bool& b) { return b; }This seems related to P2280R4, but the incorrect diagnostic occurs only since Clang 21.
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"constexprAnything related to constant evaluationAnything related to constant evaluationregression:21Regression in 21 releaseRegression in 21 releaserejects-valid