[PATCH] D45679: [clang-tidy] Add a new check, readability-unmodified-non-const-variable, that finds declarations of non-const variables that never get modified.

2018-04-17 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 142739. shuaiwang added a comment. Change to just add a helper function `isModified` Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files: clang-tidy/utils/ASTUtils.cpp clang-tidy/utils/ASTUtils.h

[PATCH] D45679: [clang-tidy] Add a new check, readability-unmodified-non-const-variable, that finds declarations of non-const variables that never get modified.

2018-04-16 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 142730. shuaiwang added a comment. Updated mostly `isModified()`. I'd like to mostly demonstrate that `isModified()` works given that there's https://reviews.llvm.org/D45444 and we'd like to merge. Repository: rCTE Clang Tools Extra

[PATCH] D45679: [clang-tidy] Add a new check, readability-unmodified-non-const-variable, that finds declarations of non-const variables that never get modified.

2018-04-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/utils/ASTUtils.cpp:85 + // LHS of any assignment operators. + const auto AsAssignmentLhs = binaryOperator( + anyOf(hasOperatorName("="), hasOperatorName("+="), hasOperatorName("-="), there is a

[PATCH] D45679: [clang-tidy] Add a new check, readability-unmodified-non-const-variable, that finds declarations of non-const variables that never get modified.

2018-04-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi @shuaiwang, i am currently working on the same check and we should definilty coordinate our work. :) What do you think about joining the forces and to work together on such a check? Things i would like to mention: - i differentiate between values and handles. I

[PATCH] D45679: [clang-tidy] Add a new check, readability-unmodified-non-const-variable, that finds declarations of non-const variables that never get modified.

2018-04-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. See also https://reviews.llvm.org/D45444. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org