Unconditionally enable -DQT_STRICT_ITERATORS, not just in debug mode
ClosedPublic

Authored by dfaure on Apr 7 2019, 1:23 PM.

Details

Summary

It turns out QT_STRICT_ITERATORS does not introduce any
overhead (they are inlined so everything gets optimized), confirmed by
Dan comparing the produced assembly in Compiler Explorer.

Diff Detail

Repository
R240 Extra CMake Modules
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10575
Build 10593: arc lint + arc unit
dfaure created this revision.Apr 7 2019, 1:23 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptApr 7 2019, 1:23 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
dfaure requested review of this revision.Apr 7 2019, 1:23 PM
aacid added a subscriber: aacid.Apr 7 2019, 4:04 PM

Are we sure we don't break code by introducing this? Or we're just going to play Whac-A-Mole with compile errors until all it's compiling again?

dfaure added a comment.Apr 7 2019, 4:23 PM

All the modules that use this cmake file, already build fine in debug mode with strict iterators.
This enables the same setting in release mode, for code that already builds fine in debug mode. So unless people have bad code in #ifndef NDEBUG, I don't expect this to break anything at all.

aacid accepted this revision.Apr 7 2019, 4:56 PM
This revision is now accepted and ready to land.Apr 7 2019, 4:56 PM
dfaure closed this revision.Apr 7 2019, 5:00 PM