diff options
author | Dávid Bolvanský <david.bolvansky@gmail.com> | 2019-10-29 19:06:48 +0100 |
---|---|---|
committer | Dávid Bolvanský <david.bolvansky@gmail.com> | 2019-10-31 10:03:11 +0100 |
commit | b06305e44949fb843310d27b139e5064b214a838 (patch) | |
tree | 7e0305af30caff001e8e7f34be3b50ec24df45dd /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | c9504954052a7630a6e760006297b5fc73a03e4a (diff) | |
download | llvm-b06305e44949fb843310d27b139e5064b214a838.zip llvm-b06305e44949fb843310d27b139e5064b214a838.tar.gz llvm-b06305e44949fb843310d27b139e5064b214a838.tar.bz2 |
[Diagnostics] Warn for std::is_constant_evaluated in constexpr mode
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions