brintos

brintos / llvm-project-archived public Read only

0
0
Text · 882 B · 6e1f505 Raw
64 lines · plain
1.. title:: clang-tidy - modernize-concat-nested-namespaces2 3modernize-concat-nested-namespaces4==================================5 6Checks for use of nested namespaces such as7``namespace a { namespace b { ... } }``8and suggests changing to the more concise syntax introduced9in C++17: ``namespace a::b { ... }``.10Inline namespaces are not modified.11 12For example:13 14.. code-block:: c++15 16  namespace n1 {17  namespace n2 {18  void t();19  }20  }21 22  namespace n3 {23  namespace n4 {24  namespace n5 {25  void t();26  }27  }28  namespace n6 {29  namespace n7 {30  void t();31  }32  }33  }34 35  // in c++2036  namespace n8 {37  inline namespace n9 {38  void t();39  }40  }41 42Will be modified to:43 44.. code-block:: c++45 46  namespace n1::n2 {47  void t();48  }49 50  namespace n3 {51  namespace n4::n5 {52  void t();53  }54  namespace n6::n7 {55  void t();56  }57  }58 59  // in c++2060  namespace n8::inline n9 {61  void t();62  }63 64