Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode | Dávid Bolvanský | 2019-10-31 | 1 | -0/+56 |
Summary: constexpr int fn1() { if constexpr (std::is_constant_evaluated()) // condition is always true! return 0; else return 1; } constexpr int fn2() { if (std::is_constant_evaluated()) return 0; else return 1; } Solves PR42977 Reviewers: rsmith, aaron.ballman Reviewed By: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69518 |