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

DonĂ¡t Nagy via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 20 08:15:44 PST 2018


donat.nagy created this revision.
donat.nagy added reviewers: alexfh, hokein, aaron.ballman, xazax.hun, whisperity.
Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs, mgorny.

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.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D54757

Files:
  clang-tidy/bugprone/BranchCloneCheck.cpp
  clang-tidy/bugprone/BranchCloneCheck.h
  clang-tidy/bugprone/BugproneTidyModule.cpp
  clang-tidy/bugprone/CMakeLists.txt
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/bugprone-branch-clone.rst
  docs/clang-tidy/checks/list.rst
  test/clang-tidy/bugprone-branch-clone.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54757.174777.patch
Type: text/x-patch
Size: 35279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181120/3948f990/attachment-0001.bin>


More information about the cfe-commits mailing list