Add __attribute__((noreturn,cold))
for _mi_assert_fail
#134586
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-feature
A feature request or enhancement
Uh oh!
There was an error while loading. Please reload this page.
Feature or enhancement
Note
I already have a PR ready in case this is accepted
Proposal:
Because
_mi_assert_fail
is not marked as anoreturn
function, the assertion is not understood by CLion and I have some false positives telling me "this ptr is not NULL" while just above there ismi_assert(ptr != NULL);
. To improve IDE's analysis, I suggest to mark_mi_assert_fail
with__attribute__((noreturn))
and__THROW
for GCC, the same attributes that are put on__assert_fail
:cc @colesbury
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere.
Linked PRs
_mi_assert_fail
asnoreturn
,cold
andthrow
#134624The text was updated successfully, but these errors were encountered: