enabled `valueFlowBailoutIncompleteVar` in selfcheck
https://trac.cppcheck.net/ticket/10045 is the meta ticket which already contains some (outdated) data and references.
I am a bit curious that there is just a single complaint about a very common symbol as std::string::npos.
Seems like the remaining bailouts are cfg-related, except for that uninstantiated(?) template parameter.
gui/codeeditorstyle.cpp:125:40: debug: valueflow.cpp:10106:valueFlowConditionExpressions bailout: Skipping function due to incomplete variable widgetFGColor [valueFlowBailoutIncompleteVar]
QVariant(defaultStyleLight.widgetFGColor)).value<QColor>();
^
gui/codeeditorstyle.cpp:125:40: debug: valueflow.cpp:10106:valueFlowConditionExpressions bailout: Skipping function due to incomplete variable widgetFGColor [valueFlowBailoutIncompleteVar] QVariant(defaultStyleLight.widgetFGColor)).value<QColor>(); ^
https://trac.cppcheck.net/ticket/10045#comment:30
lib/valueflow.cpp:2516:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable None [valueFlowBailoutIncompleteVar]
return Action::None;
^
https://trac.cppcheck.net/ticket/12538.
lib/astutils.cpp:343:90: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable intvalue [valueFlowBailoutIncompleteVar]
if (!tok->varId() && tok->hasKnownIntValue() && std::to_string(tok->values().front().intvalue) == rhs)
^
https://trac.cppcheck.net/ticket/12539.
externals/simplecpp/simplecpp.cpp:1348:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SYNTAX_ERROR [valueFlowBailoutIncompleteVar]
err.type = Output::SYNTAX_ERROR;
^
https://trac.cppcheck.net/ticket/12567
I am a bit curious that there is just a single complaint about a very common symbol as
std::string::npos.
This was an actual bug and has been addressed in #6153.
I added a few more tickets:
https://trac.cppcheck.net/ticket/10949 - npos
https://trac.cppcheck.net/ticket/12577 - endl
https://trac.cppcheck.net/ticket/12578 - cout/cerr
https://trac.cppcheck.net/ticket/12580 - errno
https://trac.cppcheck.net/ticket/12581 - __func__
Seems like the remaining bailouts are cfg-related, except for that uninstantiated(?) template parameter.
The most common ones actually require special handling and cannot simply be solved via the configuration. I filed tickets for most of them as they are also the top results in daca.
lib/checkautovariables.cpp:268:78: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable inconclusive [valueFlowBailoutIncompleteVar]
const bool printInconclusive = mSettings->certainty.isEnabled(Certainty::inconclusive);
^
https://trac.cppcheck.net/ticket/12585