Ignore duplicated switch cases with [[fallthrough]] attribute to reduce false positives.
Fixes: #47588
Paths 
  |  Differential  D147889  
[clang-tidy] Improve bugprone-branch-clone with support for fallthrough attribute ClosedPublic Authored by PiotrZSL on Apr 9 2023, 12:03 PM. 
Details Summary Ignore duplicated switch cases with [[fallthrough]] attribute to reduce false positives. Fixes: #47588 
Diff Detail 
 Event TimelineComment Actions Mostly LGTM, I suggested two cosmetic changes. 
 This revision is now accepted and ready to land.May 23 2023, 10:46 AM Closed by commit rG77f191e81ed4: [clang-tidy] Improve bugprone-branch-clone with support for fallthrough… (authored by PiotrZSL).  ·  Explain WhyMay 23 2023, 12:33 PM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
 
Diff 524769 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
 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bikeshedding: these comments are very useful, but put them after the return statements. The (meaningful content) / (number of lines) ratio is already abysmal in visitor classes like this, let's try to avoid what we can.