HomePhabricator

[clang-tidy] new check: bugprone-branch-clone

Description

[clang-tidy] new check: bugprone-branch-clone

Implement a check for detecting if/else if/else chains where two or more
branches are Type I clones of each other (that is, they contain identical code)
and for detecting switch statements where two or more consecutive branches are
Type I clones of each other.

Patch by Donát Nagy!

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

Details

Committed
SzelethusMay 15 2019, 8:06 AM
Differential Revision
D54757: [clang-tidy] new check: bugprone-branch-clone
Branches
Unknown
Tags
Unknown