<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64712>64712</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Clang] Add the ability to deprecated namespace aliases
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            enhancement,
            clang:frontend
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          philnik777
      </td>
    </tr>
</table>

<pre>
    Currently, there is no way to deprecate namespace aliases with Clang. It would be great to make this possible, since that makes it a lot less problematic to rename namespaces.

```c++
namespace my_new_ns {
  struct S {};
}

[[deprecated]] namespace my_old_ns = my_new_ns;

my_old_ns::S a; // expected-warning {{my_old_ns is deprecated}}

my_new_ns::S b; // should not be diagnosed
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkksGO4yAMhp-GXKypKElLe8ihbVRpz_MAIwJuwg6BCJzt9u1X0GramZUQSWzy_cb-VUp28Igt2xzZpqvUQmOI7Txa5-2nlLLqg7m1pyVG9ORuTJyARowINoEPcFU3oAAG54haEYJXE6ZZaQTlrEqY4GpphJNTfljBL4JrWJyBHmGIqCj_PKlPBBptgjmkZHuHWSVZr3NYUTmQwBIocIHAYUowx9A7nBRZnRkRs_BTPa0Y7xg_PPYtvy_NxDGvEn2WOt0-PF4_fAImH0mARHHRBO8lJjtWPzL5_ZWdG3f8aoBhm45tOvgGD84UeN09pZ68sn-dYvWB1Yd3UKw-AhNnJs6Af2fUhObtqqK3friXdHySbYKXCmT3o8YX0Tu8f4GnsUzEB8pTMVYNPiQ0Pzp3_6xMW5t9vVcVtuvtXqxrvueyGtu63mtuJPZ6Ly9GIW8EF_t-t9ZSNjvDK9sKLmq-W28EF-tGrvRuixd-uTTbGndb2bCG46SsWzn3Z1qFOFQ2pQXbbSPXonKqR5eKS4VAPyqvcUJPTAgmTkwInQ3G6sMlBk_oTU5suiq2GffWL0NiDXc2UXoKkCVXnF_cmad2MCbbG1RvnaXv1jb_e7taomtHork0trRzsDQu_UqHiYlzVno83uYYfqMmJs7lXomJc7navwAAAP__dwQaqw">