[clang-tidy] bugprone-infinite-loop: Fix false positives with volatile addresses.
Low-level code may occasionally deal with direct access by concrete addresses such as 0x1234. Values at these addresses act like globals: they can change at any time. They typically wear volatile qualifiers. Suppress all warnings on loops with conditions that involve casting anything to a pointer-to-...-pointer-to-volatile type. The closely related bugprone-redundant-branch-condition check doesn't seem to be affected. Add a test just in case. Differential Revision: https://reviews.llvm.org/D108808
Loading
Please sign in to comment