HomePhabricator

[clang-format] Fix FixNamespaceComments when BraceWrapping AfterNamespace is…

Description

[clang-format] Fix FixNamespaceComments when BraceWrapping AfterNamespace is true.

Summary:
NamespaceEndCommentsFixer did not fix namespace comments when the brace opening the namespace was not on the same line as the "namespace" keyword.
It occurs in Allman, GNU and Linux styles and whenever BraceWrapping.AfterNamespace is true.

Before:

namespace a
{
void f();
void g();
}

After:

namespace a
{
void f();
void g();
} // namespace a

Reviewers: krasimir

Reviewed By: krasimir

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D37904