[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 15 08:42:28 PDT 2018
Eugene.Zelenko added inline comments.
================
Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:37
+static bool singleNamedNamespaceChild(NamespaceDecl const &ND) {
+ auto const Decls = ND.decls();
+ if (childrenCount(Decls) != 1)
----------------
Type is not spelled in declaration, so please don't use auto.
================
Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:53
+ LangOptions const &LangOpts) {
+ auto const TextRange =
+ Lexer::getAsCharRange(ReplacementRange, Sources, LangOpts);
----------------
Type is not spelled in declaration, so please don't use auto.
================
Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:55
+ Lexer::getAsCharRange(ReplacementRange, Sources, LangOpts);
+ auto const CurrentNamespacesText =
+ Lexer::getSourceText(TextRange, Sources, LangOpts);
----------------
Type is not spelled in declaration, so please don't use auto.
================
Comment at: docs/ReleaseNotes.rst:96
+ - New :doc:`modernize-concat-nested-namespaces
+ <clang-tidy/checks/modernize-concat-nested-namespaces>` check.
----------------
Wrong indentation. See other entries.
================
Comment at: docs/clang-tidy/checks/modernize-concat-nested-namespaces.rst:12
+
+.. code-block:: c++
+ namspace n1 {
----------------
Please add empty line after.
================
Comment at: docs/clang-tidy/checks/modernize-concat-nested-namespaces.rst:34
+
+.. code-block:: c++
+ namspace n1::n2 {
----------------
Please add empty line after.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D52136
More information about the cfe-commits
mailing list