Open davidhunter22 opened 2 years ago
@llvm/issue-subscribers-clang-format
I would like to work on this issue.
phyBrackets great I look forward to trying it. I did notice that the issue also effects lines like using namespace Foo; Maybe the code just sees the keyword namespace and always does the same thing.
Hi Team,
I am interested to work on this issue, can someone help me assigning this to me. I don't have permissions to assign it to myself.
Thanks
Hi,
I am planning to add a new option 'IndentNamespaceAliases' which can be a boolean value to control the indentation of Aliases, as per NamespaceIndentation.
does this sound good? or any suggestions?
thanks rajkumar
Sounds good to me. Maybe consider doing something like IndentUsingNamespace as well. I assume if IndentNamespaceAliases is not present the behavior be exactly as it is now to avoid modifying existing code.
Cool, thanks for the confirmation, I will try to work on this week.
-Rajkumar Ananthu
I'm wondering why we need the option?
what large c++ project has this style?
Sorry I don't get it, surely NamespaceIndentation
is the style?
namespace Foo
{
namespace Bar = Baz;
int i;
double d;
}
clang format does not seem to differentiate between introducing a namespace and a name space alias. If I have the code
If I have "NamespaceIndentation: None" the
namespace Bar = Baz;
will have it's indentation removed.It would be nice to control this separately. In particular to treat the indetation of namespace aliases as distinct from introducting a new namespace. So in the above to leave the namespace alias indented even with "NamespaceIndentation: None"