[llvm-bugs] [Bug 52225] New: Incorrect and missing tautological warnings with consteval if
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 19 12:19:36 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52225
Bug ID: 52225
Summary: Incorrect and missing tautological warnings with
consteval if
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++2b
Assignee: unassignedclangbugs at nondot.org
Reporter: aaron at aaronballman.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
The following consteval if statements produce tautological warnings that don't
seem correct in all cases.
```
constexpr void f() {
if consteval {
if consteval { // Correct diagnostic
}
if !consteval { // Incorrect diagnostic
}
}
if !consteval {
if consteval { // Missing diagnostic
}
if !consteval { // Missing diagnostic
}
}
}
```
https://godbolt.org/z/6KjW4v5dn
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211019/c6a7eec1/attachment.html>
More information about the llvm-bugs
mailing list