[PATCH] D54349: [clang-tidy] new check 'readability-redundant-pp'

2018-11-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:73 + + Finds potentially redundant preprocessor usage. + preprocessor directives? Same in documentation. Comment at: docs/clang-tidy/checks/readability-redundant-pp.rst:8

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-pp'

2018-11-09 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos added a comment. In https://reviews.llvm.org/D54349#1293622, @lebedev.ri wrote: > No one will know for sure what "pp" in "readability-redundant-pp" means. > I'd highly recommend to fully spell it out. Will do. > Also, i'd like to see some analysis of the false-positives. Things I con

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-pp'

2018-11-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi vmiklos, thank you for working on this patch! I added a few comments. Comment at: clang-tidy/readability/ReadabilityTidyModule.cpp:83 "readability-misplaced-array-index"); +CheckFactories.registerCheck("readability-redundant-pp");

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-pp'

2018-11-09 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. No one will know for sure what "pp" in "readability-redundant-pp" means. I'd highly recommend to fully spell it out. Also, i'd like to see some analysis of the false-positives. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54349 _

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-pp'

2018-11-09 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos added a comment. I've used this check originally on LibreOffice (core, online) code and it found a handful of not necessary ifdef / ifndef lines. It seemed it's simple and generic enough that it would make sense to upstream this. Repository: rCTE Clang Tools Extra https://reviews.ll

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-pp'

2018-11-09 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos created this revision. vmiklos added reviewers: JonasToth, alexfh. Herald added subscribers: cfe-commits, kbarton, xazax.hun, mgorny, nemanjai. Finds potentially redundant preprocessor usage. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54349 Files: clang-tidy/reada