summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-constant-evaluated-constexpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Diagnostics] Warn for std::is_constant_evaluated in constexpr modeDávid Bolvanský2019-10-311-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
OpenPOWER on IntegriCloud