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

    <tr>
        <th>Summary</th>
        <td>
            Incorrect delivery of `-Wdollar-in-identifier-extension` inside stringified `asm` macros
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    With the following program:
```c
// test.c

#define ASM_BLOCK(ops, ...) asm volatile(ops __VA_ARGS__)
#define ASM(...) #__VA_ARGS__ "\n"

int main(void) {
        ASM_BLOCK(ASM(int $3));
}
```
Compiled using `clang -Wdollar-in-identifier-extension test.c` under `clang` version `15.0.6` - the `-Wdollar-in-identifier-extension` diagnostic seems to be erroneously triggered by the `$` sign in the `ASM` macro parameter, as it is not an identifier but rather is stringified later.

My expectation would be that this situation should not trigger the diagnostic, however I could be incorrect depending on the intention of the `-Wdollar-in-identifier-extension` diagnostic.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVNGq4zYQ_Rr5ZYiR5cSJH_yQm0uWpV0K3aX7GGRrYk-RJSONczd_X-Qk96al0LIhIDQzZ3TOGVk6RuodYiM2L2LzmumZBx-ab0P5rewGJz8VnLXeXJvvxAPwgHD21vo3cj1MwfdBj6LcC_kq5F5U8vbv7nt1FOoIjJHzR-ieKA2eySHsv345vfz62-EXoXZ-ikIdIM9zoWrQcYSLt5rJ4i0Jp9Mf-9P-909fTyeh6n9pJdTujhaqfKoGoZTYHFxanmiQYxg1OaF2F09mwW1fbjm4_54J3k5IKKHWZaKgalHeAWL7-g8XbtuDHyeyaGCOybPkjtWuh9V3463VYUVuRQYd05kwrPAHo4vk3cO2SsLsDIZ3ZIpcMCw1opLFJpd5lYKrZTyikv_VOhUb0r3zkamDiDhGYA8tAobgHfo52itwoL7HgAba66O1UOuETncGyD2iyZhKwqi74GHSQY_IGNIwdQRioAjOM2gHH3SgnRmC5gFDykcO5PqUMWA1Y8ifJ_XlCvhjwo41J9lvfrYm0eVBM_CQ8MTzLRmHJZsOvCtYaH4ITrwG_4YXDPAZukcvcp0PATsGgxM6k6blbxLJcaLtHfjzz5mcZ6YpTV3WOsOmqLbFeiNVobKh2ZaVNtXabLE0BW7WbSFred4avStbU3dVRo2SShWqqItiXZYqL7XGzmxNW5wLrAsj1hJHTTa39jLmPvQZxThjs6k3uyqzukUbH593aFLRqp37KNbSUuT4AWNii83nJx8sXTBck-r_qZhcJIN_m6aopI7j-_2I2RxsMzBPMT0cyxPREw9zm3d-FOqY6NyX1RT8n9ixUMdFUhTquKj6KwAA__-Ym4AP">