[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2020-01-28 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml added a comment. In D52136#1844384 , @grandinj wrote: > Hi > > Thanks a lot for this checker - would it be possible to enhance it to also > update stuff in associated header files? > > Thanks Check out D61989 , Re

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-25 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml added a comment. Thanks you all for your participation in the review process. I guess it is done now. I don't have write access to the repositories, @aaron.ballman, could you apply the patch on my behalf? Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:3

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-25 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml updated this revision to Diff 166945. wgml marked 10 inline comments as done. wgml added a comment. Dropped a few consts, updated doc text. https://reviews.llvm.org/D52136 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp clang-tidy/moder

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-22 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml updated this revision to Diff 166602. wgml marked an inline comment as done. wgml added a comment. Updated signature of `concatNamespaces`. https://reviews.llvm.org/D52136 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp clang-tidy/moder

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-22 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml marked 6 inline comments as done. wgml added inline comments. Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:52 +const NamespaceContextVec &Namespaces) { + std::ostringstream Result; + bool First = true; aaron.ballman wrote: > wgml wr

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-21 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml marked 2 inline comments as done. wgml added inline comments. Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:52 +const NamespaceContextVec &Namespaces) { + std::ostringstream Result; + bool First = true; aaron.ballman wrote: > Can thi

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-21 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml updated this revision to Diff 166529. wgml marked 4 inline comments as done. wgml edited the summary of this revision. https://reviews.llvm.org/D52136 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp clang-tidy/modernize/ConcatNestedNamesp

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-19 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml marked 2 inline comments as done. wgml added inline comments. Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:102-108 + if (childrenCount(ND.decls()) == 0) { +SourceRange Removal(Namespaces.front().Begin, Namespaces.front().RBrace); + +diag(Namespac

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-16 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml updated this revision to Diff 165698. wgml added a comment. One last typo. https://reviews.llvm.org/D52136 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp clang-tidy/modernize/ConcatNestedNamespacesCheck.h clang-tidy/modernize/Moderni

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-16 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml updated this revision to Diff 165677. wgml added a comment. Fixed typo in documentation. Refactored a bit of check code to make it more readable. https://reviews.llvm.org/D52136 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp clang-tidy

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-15 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml updated this revision to Diff 165658. wgml marked 12 inline comments as done. wgml added a comment. Adjusted to review comments. https://reviews.llvm.org/D52136 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp clang-tidy/modernize/Concat

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-15 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml added inline comments. Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:102-108 + if (childrenCount(ND.decls()) == 0) { +SourceRange Removal(Namespaces.front().Begin, Namespaces.front().RBrace); + +diag(Namespaces.front().Begin, + "Nested nam

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-15 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml added inline comments. Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:102-108 + if (childrenCount(ND.decls()) == 0) { +SourceRange Removal(Namespaces.front().Begin, Namespaces.front().RBrace); + +diag(Namespaces.front().Begin, + "Nested nam

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-15 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml created this revision. wgml added reviewers: alexfh, aaron.ballman, hokein. Herald added subscribers: xazax.hun, mgorny. Finds instances of namespaces concatenated using explicit syntax, such as `namespace a { namespace b { [...] }}` and offers fix to glue it to `namespace a::b { [...] }`.