-
Notifications
You must be signed in to change notification settings - Fork 18
Run scanbuild with asserts enabled, as suggested by its manual #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
I don't think it's good idea, it's more important to check Release because that's what most (or all) players will use. |
can do both, but debug is more important for static analysis as it includes more code and enables assertions which help to analyze the code. |
'both' would make builds even slower than it is now. |
c949461
to
7cebbdf
Compare
Changed the PR to instead enable asserts for more accurate analysis. |
Have you checked that #if defined( DEBUG ) || defined( FASTDEBUG )
#define ASSERT( _condition, _text ) \
if ( !( _condition ) ) { \
Log( (std::string) "FATAL: " + _text ); \
THROW( _text ); \
}
// for rare cases when Log() is not available
#define ASSERT_NOLOG( _condition, _text ) \
if ( !( _condition ) ) { \
THROW( _text ); \
}
#else
#define ASSERT( _condition, _text )
#define ASSERT_NOLOG( _condition, _text )
#endif meaning they are removed in Release during preprocessing. I checked and haven't found any good justification of scanning in debug mode instead of release.
which gives no reasons and then just explains how to deal with problems of scanning debug builds (false positives). |
Perhaps use normal assertions instead of your bikeshed stuff then? No idea if it does. |
No description provided.