HomePhabricator

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

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

Details

Committed
JonasTothOct 31 2018, 9:50 AM
Reviewer
aaron.ballman
Differential Revision
D51949: [clang-tidy] new check 'readability-isolate-declaration'
Branches
Unknown
Tags
Unknown