Customize the behaviour of namespace formatting

If you have a C++ file, with namespaces as follows:

// a.h
namespace a { namespace b { namespace c {
Class A {

};

} } } // namespace a, namespace b, namespace c.

It is formatted as:

// a.h
namespace a { namespace b { namespace c {
Class A {

};

}}} // namespace a::b::c.

I want to keep the original formatting. Is it possible?
If not, can someone point me to the code which does this formatting so that I can look at creating a patch for my own use?