[PATCH] D147889: [clang-tidy] Improve bugprone-branch-clone with support for fallthrough attribute

Piotr Zegar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 9 12:03:19 PDT 2023


PiotrZSL created this revision.
Herald added subscribers: carlosgalvezp, xazax.hun.
Herald added a reviewer: njames93.
Herald added a project: All.
PiotrZSL requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Ignore duplicated switch cases with [[fallthrough]] attribute to reduce false positives.

Fixes: #47588


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147889

Files:
  clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/bugprone/branch-clone.rst
  clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-fallthrough.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147889.512029.patch
Type: text/x-patch
Size: 8275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230409/219944ca/attachment.bin>


More information about the cfe-commits mailing list