Open r-barnes opened 6 months ago
I test in latest version and get the following result:
1 | namespace MY_NAMESPACE_MACRO {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | namespace nested {
| ~~~~~~~~~~~~~~~~
| namespace MY_NAMESPACE_MACRO::nested
3 |
4 | } // nested
5 | } // MY_NAMESPACE_MACRO
But when I apply --fix
, it will be like this:
// MY_NAMESPACE_MACRO
only comment
I found a similar bug
namespace A {
#define MACRO
namespace B {
} // B
} // A
will get rewritten as
namespace A::B {
} // A::B
the macro is deleted.
When using
modernize-concat-nested-namespaces
in clang-tidy this:gets rewritten as
but the appropriate rewrite is