[PATCH] D102576: [clang-tidy] cppcoreguidelines-avoid-do-while: a new check

Fabian Thurnheer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 19 02:03:42 PDT 2021


DNS320 updated this revision to Diff 346360.
DNS320 added a comment.

I updated the check according to the last review.

It ignores now do-while statements which are inside a macro and have a false condition. (false condition part was taken from bugprone-terminating-continue <https://clang.llvm.org/extra/clang-tidy/checks/bugprone-terminating-continue.html>)

Tests were added and the check documentation has now a hint about ignoring do-while statements in macros.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102576

Files:
  clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidDoWhileCheck.cpp
  clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidDoWhileCheck.h
  clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt
  clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-avoid-do-while.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-avoid-do-while.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102576.346360.patch
Type: text/x-patch
Size: 9404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210519/19a12ffe/attachment-0001.bin>


More information about the cfe-commits mailing list