xref: /llvm-project/clang-tools-extra/docs/clang-tidy/checks/bugprone/terminating-continue.rst (revision 6e566bc5523f743bc34a7e26f050f1f2b4d699a8)
1.. title:: clang-tidy - bugprone-terminating-continue
2
3bugprone-terminating-continue
4=============================
5
6Detects ``do while`` loops with a condition always evaluating to false that
7have a ``continue`` statement, as this ``continue`` terminates the loop
8effectively.
9
10.. code-block:: c++
11
12  void f() {
13  do {
14    // some code
15    continue; // terminating continue
16    // some other code
17  } while(false);
18