[llvm-bugs] [Bug 44250] New: missing-noreturn and constexpr-if
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Dec 8 06:39:29 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=44250
Bug ID: 44250
Summary: missing-noreturn and constexpr-if
Product: clang
Version: 9.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: rianquinn at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Clang says that this function should be labelled as noreturn which is not true
when the constexpr is false. Since we do not have conditional noreturn
statements, and noreturn is not part of the function's signature, this is a
false positive.
static auto
fail_fast() noexcept -> void
{
if constexpr (!autosar_compliant) {
if constexpr (details::autosar::exit_instead_of_abort) {
std::exit(EXIT_FAILURE); //NOSONAR
}
std::abort(); //NOSONAR
}
}
--
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/20191208/af1763d1/attachment-0001.html>
More information about the llvm-bugs
mailing list