[all-commits] [llvm/llvm-project] 4dd92d: [clang-tidy] Fix bugprone-terminating-continue whe...

Nathan James via All-commits all-commits at lists.llvm.org
Sat Mar 20 03:59:59 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4dd92d61dbc4b3c51a98e1d0bfccabed24759ba9
      https://github.com/llvm/llvm-project/commit/4dd92d61dbc4b3c51a98e1d0bfccabed24759ba9
  Author: Nathan James <n.james93 at hotmail.co.uk>
  Date:   2021-03-20 (Sat, 20 Mar 2021)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/TerminatingContinueCheck.cpp
    M clang-tools-extra/test/clang-tidy/checkers/bugprone-terminating-continue.cpp

  Log Message:
  -----------
  [clang-tidy] Fix bugprone-terminating-continue when continue appears inside a switch

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.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D98338




More information about the All-commits mailing list