qt5base-lts/tests/auto/corelib/tools/qsharedpointer
Marc Mutz 3a72496b5c tests: fix some -Wvolatile
C++20 deprecated compound volatile statements such as pre- and
post-increments, to stress that they're not atomic. So instead of

    volatile i;
    ~~~~;
    ++i;

you're now supposed to write

    volatile i;
    ~~~~;
    int j = i; // volatile load
    ++j;
    i = j; // volatile store

which matches more closely what hardware does.

Instead of fixing every use of volatile pre- or post-increment in this
fashion individually, and realising that probably a few more Qt
modules will have the same kind of code patterns in them, write
QtPrivate functions to do the job centrally.

Change-Id: I838097bd484ef2118c071726963f103c080d2ba5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-07-28 17:50:09 +02:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
CMakeLists.txt tests: fix some -Wvolatile 2021-07-28 17:50:09 +02:00
externaltests.cpp Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00
externaltests.h Updated license headers 2016-01-21 18:55:18 +00:00
forwarddeclared.cpp Updated license headers 2016-01-21 18:55:18 +00:00
forwarddeclared.h Updated license headers 2016-01-21 18:55:18 +00:00
nontracked.cpp Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00
nontracked.h Updated license headers 2016-01-21 18:55:18 +00:00
tst_qsharedpointer.cpp tests: fix some -Wvolatile 2021-07-28 17:50:09 +02:00
wrapper.cpp Updated license headers 2016-01-21 18:55:18 +00:00
wrapper.h Updated license headers 2016-01-21 18:55:18 +00:00