[PATCH] D20053: [clang-tidy] Add misc-unnecessary-mutable check.

2016-05-08 Thread Marek Sokołowski via cfe-commits
mnbvmar created this revision. mnbvmar added a reviewer: alexfh. mnbvmar added subscribers: krystyna, sbarzowski, Prazek, staronj, cfe-commits. This implements unnecessary-mutable check. It's still bug-prone and might produce false positives, so all suggestions are welcome. http://reviews.llvm.o

Re: [PATCH] D20053: [clang-tidy] Add misc-unnecessary-mutable check.

2016-05-11 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. Comment at: docs/clang-tidy/checks/misc-unnecessary-mutable.rst:9 @@ +8,3 @@ + +.. code-block:: c++ + class SomeClass { Please verify the documentation can be built without errors. On Ubuntu this boils down to: Install sphinx:

Re: [PATCH] D20053: [clang-tidy] Add misc-unnecessary-mutable check.

2016-05-11 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a comment. One quick thought: we should probably have a test that includes a macro to make sure nothing explodes. e.g., #define FIELD(T, N) mutable T N class C { FIELD(int, RemoveMutable); FIELD(int, KeepMutable)

Re: [PATCH] D20053: [clang-tidy] Add misc-unnecessary-mutable check.

2016-05-12 Thread Piotr Padlewski via cfe-commits
Prazek added a reviewer: Prazek. Comment at: clang-tidy/misc/UnnecessaryMutableCheck.cpp:152 @@ +151,3 @@ +// it is the only declaration in a declaration chain. +static bool CheckRemoval(SourceManager &SM, const SourceLocation &LocStart, + const SourceLocat

Re: [PATCH] D20053: [clang-tidy] Add misc-unnecessary-mutable check.

2016-05-12 Thread Etienne Bergeron via cfe-commits
etienneb added a subscriber: etienneb. Comment at: clang-tidy/misc/UnnecessaryMutableCheck.cpp:38 @@ +37,3 @@ + + void RunSearch(Decl *Declaration) { +auto *Body = Declaration->getBody(); nit: Decl *Declaration -> const Decl *Declaration and other visitor fu

Re: [PATCH] D20053: [clang-tidy] Add misc-unnecessary-mutable check.

2016-05-14 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/misc-unnecessary-mutable.cpp:237 @@ +236,3 @@ + +// Fails for now. +/* It would be good to put further information in about why this fails. http://reviews.llvm.org/D20053 ___

Re: [PATCH] D20053: [clang-tidy] Add misc-unnecessary-mutable check.

2016-06-02 Thread Marek Sokołowski via cfe-commits
mnbvmar updated this revision to Diff 59445. mnbvmar added a comment. Fixes done. Added macro test. Docs should be working now. Updated docs. http://reviews.llvm.org/D20053 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UnnecessaryMutableCheck.cpp

Re: [PATCH] D20053: [clang-tidy] Add misc-unnecessary-mutable check.

2016-06-02 Thread Marek Sokołowski via cfe-commits
mnbvmar marked 14 inline comments as done. mnbvmar added a comment. http://reviews.llvm.org/D20053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20053: [clang-tidy] Add misc-unnecessary-mutable check.

2016-06-02 Thread Marek Sokołowski via cfe-commits
mnbvmar added inline comments. Comment at: clang-tidy/misc/UnnecessaryMutableCheck.cpp:47 @@ +46,3 @@ + + void RunSearch(const Decl *Declaration) { +auto *Body = Declaration->getBody(); Unless I miss something, the moment we set FoundNonConstUse to true, we s

Re: [PATCH] D20053: [clang-tidy] Add misc-unnecessary-mutable check.

2016-06-03 Thread Etienne Bergeron via cfe-commits
etienneb added inline comments. Comment at: clang-tidy/misc/UnnecessaryMutableCheck.cpp:23 @@ +22,3 @@ + +// Matcher checking if the declaration is non-macro existent mutable which is +// not dependent on context. add an anonymous namespace around this declaration

Re: [PATCH] D20053: [clang-tidy] Add misc-unnecessary-mutable check.

2016-05-08 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). http://reviews.llvm.org/D20053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt