HomePhabricator

[clang-tidy] new check 'readability-isolate-declaration'

Authored by JonasToth on Oct 31 2018, 9:50 AM.

Description

[clang-tidy] new check 'readability-isolate-declaration'

Summary:
This patch introduces a new clang-tidy check that matches on all declStmt that declare more then one variable
and transform them into one statement per declaration if possible.

It currently only focusses on variable declarations but should be extended to cover more kinds of declarations in the future.
It is related to https://reviews.llvm.org/D27621 and does use it's extensive test-suite. Thank you to firolino for his work!

Reviewers: rsmith, aaron.ballman, alexfh, hokein, kbobyrev

Reviewed By: aaron.ballman

Subscribers: ZaMaZaN4iK, mgehre, nemanjai, kbarton, lebedev.ri, Eugene.Zelenko, mgorny, xazax.hun, cfe-commits

Tags: #clang-tools-extra

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

llvm-svn: 345735

Details

Committed
JonasTothOct 31 2018, 9:50 AM
Reviewer
aaron.ballman
Differential Revision
D51949: [clang-tidy] new check 'readability-isolate-declaration'
Parents
rG1c254c6716cd: [InstCombine] refactor fabs+fcmp fold; NFC
Branches
Unknown
Tags
Unknown