<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57194>57194</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-rename doesn't work for namespaces
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
marcin-szmagara
</td>
</tr>
</table>
<pre>
The [official documentation](https://clang.llvm.org/extra/clang-rename.html) advertises `clang-rename` as able to rename namespaces. Here is a counterexample:
Running `clang-rename --qualified-name=n1 --new-name=k1 minimal-namespace-test.cpp` (source file contents below)
```c++
namespace n1
{
int x;
}
namespace n1_alias = n1;
int main()
{
using namespace n1;
(void)x;
(void)n1_alias::x;
}
```
produces following result:
```c++
namespace k1
{
int x;
}
namespace n1_alias = n1;
int main()
{
using namespace n1;
(void)x;
(void)n1_alias::x;
}
```
leaving both the using directive and namespace alias declaration untouched.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzlVEuPnDAM_jVwsUA8BhgOHHY1qnqueq9CYiDdkEzzmJn219cwL3a1Un9ApSjE7882dm_E7-77hBBVr2YYJJdMgTA8zKg989LoqDpExX7y_uii8iUqvtDhiukxVeo0p8aOxMCLt-wuSCxqNmM6-VlFRQtMnNB66dBBVGdbFSKBOWC9QvAGrkxYLndkHF0KX9EiSFIBboL2RF3YfFS4QMkOUXa7vwWtpR7hYwBIkl-BKTlIFMkasTzonLgaz3f6LYdZajkzlTwiJx6dT_nxuCCk9J0JliMMkoByQzi0d9CjMmdKcAuE9K-HR8Xrclbuwy_o_KbX3EQAUnu4ROXrXXDY-tta_qBEqFoEeXHzMFjvxcnMpCasT0TPGMEt1XkHo3wIyeZkpCC7y6fce-Sl5uXLZ1DvSW8RHa0RgXoIg1FUpyW-RReU_9C6f1Xs7b-pmEJ2WoL2xk_gaSavGIS0yL08ITAtNoiuuQmk_92ukwo0ICbwCUUaY5fXddaUu31bx6IrRVu2LPbSK-zeDYgw6KgGjYezsW_ULLuZvzhY1b0f_VH6KfQpNzMRywa4fRLq90_CSaR0LqCjR9Xk7S6eunLfsrYRItvVrBYFY0PZsLZu2rzeD3lRxorRLLmOdlBUFDSasLqgNy2fWHZFVhTZPm_yPN9VVTrk_VBgn7Utr9qyaqNdhtRJ9VhIse1WSH0YHQmVdN49hcw5OWrENRz5Z8FPxnYzs1zqxP2Z2UgFjVcI3ZrCX1tjirM">