https://bugs.llvm.org/show_bug.cgi?id=45446
Bug ID: 45446
Summary: false positive: -Wtautological-type-limit-compare
Product: clang
Version: 9.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
The following code triggers the `tautological-type-limit-compare` warning on
64bit.
--------------------------------------------------------------------
uint64_t size = get();
if constexpr(std::numeric_limits<decltype(size)>::max() >
std::numeric_limits<size_t>::max())
{
if(size > std::numeric_limits<size_t>::max())
return ReturnCode::outOfRange;
}
--------------------------------------------------------------------
To me this looks like a false positive. Alternatively, is there a "better" way
to express this?
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs