This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] bugprone-assert-side-effect: Improve warning message.
ClosedPublic

Authored by NoQ on Jan 27 2021, 4:08 AM.

Details

Summary

found assert() with side effect sounds exciting but not very clangy. The "found" part is implied by the very presence of the warning, no need to state it separately. I suggest side effect in assert() condition discarded in release builds as it additionally explains what exactly is wrong with the code and what consequences it may have.

Diff Detail

Event Timeline

NoQ created this revision.Jan 27 2021, 4:08 AM
NoQ requested review of this revision.Jan 27 2021, 4:08 AM
alexfh accepted this revision.Jan 28 2021, 5:58 PM

Thanks, looks good!

This revision is now accepted and ready to land.Jan 28 2021, 5:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2021, 10:32 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dmajor added a subscriber: dmajor.Jan 29 2021, 8:24 AM