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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] __attribute__((nodebug)) is silently dropped on `using` aliases in some locations
        </td>
    </tr>

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

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

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

<pre>
    ```c++
using type1 = __attribute__((nodebug)) int;

using type2 = int __attribute__((nodebug));

using type3 __attribute__((nodebug)) = int;
```
results in this AST:
```
TranslationUnitDecl
|-TypeAliasDecl <line:2:1, col:40> col:7 type1 'int'
| `-BuiltinType 'int'
|-TypeAliasDecl <line:4:1, col:15> col:7 type2 'int'
| `-BuiltinType 'int'
`-TypeAliasDecl <line:6:1, col:40> col:7 type3 'int'
  |-BuiltinType 'int'
  `-NoDebugAttr <col:28>
```
Note that `type1` and `type2` don't have the `NoDebugAttr`, but clang accepts the code above without any diagnostic.

https://godbolt.org/z/Mqfe13jo1
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVE-PuzYQ_TTDxUpkxvwJBw5s8sute-n2HBmYgLeOTfGQKv30lUlW7UZdbX-SJTCe996MZx46BDM4ohryF8gPiV549HM9jcY683tZlknr-1sNhbyvDvAlLtkswbhB8G2iVIA6iNNJM8-mXZhOJ8Ad4M75ntplAKwAK2Ecg4rIT2BcwcbxtwT_AVbfqz7YH-CPMkA2M4XFchDGCR5NEM2vb6Cap6C3WbtgNRvvfnOGD9TZGFHuN2-3iRprdIjfBKi9NY5ANQiqSQH3ovMWVJNJUD8e7-XHbWEZM8LyTiWgkJuXxVg2LrI-n38plX2WSvNnKfw5qUJ-KVV8V5X6RCVEzPsrIbGm8eoPsU0N8xyF7mS4A_XjqQevnknwqDnC1huEQgrt-o89xn3vHWDJYtTXGE3x8F8SkQr3ol1YdFa7Qeiuo4nDGtr5noRu_ZXEn4ZHv7DQ7iZ6owfnA5tuex-8kXkKcUjwCHgcfN96y1s_D4DHvwCPv_xxplS9-zTpa9VXqtIJ1WmpsqIqVK6SsZaEJZ11SVXepzlVlc5UmmKet7u2yrtzYmqUmKWIMkWZ57jVpOWuqsqsKLoqa1vIJF20sVtrr5eonZgQFqpTlCViYnVLNqxuRlwrBdWcZ--YXA-I0eNzHbGbdhkCZNKawOEfNjZs17_BfgXn_8fYQQRjybG9iX7200S98C42YHXq2q04U7SaLfgLCeu71VQhWWZbP92r4XFpt52_AB5jXo_HZpr9O3UMeFxLDoDHR9XXGv8OAAD__3utcnU">