https://bugs.llvm.org/show_bug.cgi?id=52206
Bug ID: 52206
Summary: Clang allow inconsistent deduction for auto return
type when using if consteval
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++2b
Assignee: unassignedclangb...@nondot.org
Reporter: hewi...@gmail.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
constexpr auto f() {
if consteval { return 0; }
if !consteval { return 0.0; }
}
int main() {
auto x = f();
constexpr auto y = f();
}
https://godbolt.org/z/s5voohMnd
clang accepts this.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs