You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running clang-tidy, the analyzer is able to provide much more succinct problem reports when developers can inform the analyzer "if this function is called, stop, that's the bug".
Frequently, boost test based unit tests can give the analyzer fits where it dumps out hundreds or thousands of lines of additional analysis pertaining to the boost test framework, when it should really have stopped at the assertion failing instead of continuing to digest all of the inner machinery from the framework.
To enable this enhanced analysis, it's sufficient to check in the preprocessor
__has_feature(attribute_analyzer_noreturn)
and if that's true, then add
__attribute__((analyzer_noreturn))
to some appropriate function that is only called when a test case fails.
The text was updated successfully, but these errors were encountered:
When running clang-tidy, the analyzer is able to provide much more succinct problem reports when developers can inform the analyzer "if this function is called, stop, that's the bug".
Frequently, boost test based unit tests can give the analyzer fits where it dumps out hundreds or thousands of lines of additional analysis pertaining to the boost test framework, when it should really have stopped at the assertion failing instead of continuing to digest all of the inner machinery from the framework.
To enable this enhanced analysis, it's sufficient to check in the preprocessor
and if that's true, then add
to some appropriate function that is only called when a test case fails.
The text was updated successfully, but these errors were encountered: