This patch adds a NamespaceEndCommentsFixer TokenAnalyzer for clang-format,
which fixes end namespace comments.
It currently supports inserting and updating existing wrong comments.
Example source:
namespace A { int i; } namespace B { int j; } // namespace A
after formatting:
namespace A { int i; } // namespace A namespace B { int j; } // namespace B
I don't think you'll ever need the actual tokens. How about just returning the name here?