[clang-tidy] Improve bugprone-branch-clone with support for fallthrough attribute
authorPiotr Zegar <me@piotrzegar.pl>
Tue, 23 May 2023 18:44:55 +0000 (18:44 +0000)
committerPiotr Zegar <me@piotrzegar.pl>
Tue, 23 May 2023 19:32:36 +0000 (19:32 +0000)
commit77f191e81ed475fbbc8eaa2e2dbe6a0a02f3b0c2
treeaeba863fdb136465ef483259f952b68b803b4c6b
parent8b17728214ec70c002846298d9dc0963ed2a3764
[clang-tidy] Improve bugprone-branch-clone with support for fallthrough attribute

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

Fixes: #47588

Reviewed By: donat.nagy

Differential Revision: https://reviews.llvm.org/D147889
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 [new file with mode: 0644]