Don't emit a warning if the continue appears in a switch context as changing it to break will break out of the switch rather than a do loop containing the switch.
Fixes https://llvm.org/PR49492.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM, but please commit with a better commit message.
clang-tools-extra/test/clang-tidy/checkers/bugprone-terminating-continue.cpp | ||
---|---|---|
81 | I'd appreciate an additional test: switch (2) { case 2: do { continue; // Should still diagnose this one } while (0); } |
I'd appreciate an additional test: