[PATCH] D98338: [clang-tidy] Fix bugprone-terminating-continue when continue appears inside a switch

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 18 13:10:11 PDT 2021


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
Herald added a project: clang-tools-extra.

LGTM, but please commit with a better commit message.



================
Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-terminating-continue.cpp:72
+    }
+  } while (false);
 }
----------------
I'd appreciate an additional test:
```
switch (2) {
case 2: do {
  continue; // Should still diagnose this one
} while (0);
}
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98338/new/

https://reviews.llvm.org/D98338



More information about the cfe-commits mailing list