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

    <tr>
        <th>Summary</th>
        <td>
            Macros not expanded in #pragma when (just) preprocessing
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    ```
#define PP X
void F() {
#pragma unroll PP
  ;
}
```

We get the expected error, when compiling normally:
```
clang++ -c u.cc
u.cc:7:18: error: use of undeclared identifier 'X'
```

But when preprocessing first, or using -save-temps, compilation will fail complaining about `PP`, not `X`
```
clang++ -E u.cc | clang++ -x cpp-output - -c
u.cc:7:16: error: use of undeclared identifier 'PP'
```

```
clang++ -c -save-temps u.cc                 
u.cc:3:16: error: use of undeclared identifier 'PP'
```

(This breaks -save-temps use when one has pragmas that look like that.)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0U8tupDoQ_RqzKdECm-eCRXdye3clFle62Rq7ACduG_mRx9-PgJ7JdBS1NItBCOxju-qc4yruvZoMYkfKEykfEx7DbF0XneFh5iYZrPzoSJVd3-yRZEdCmcRRGYS-h6cde7VKwpnQhtAWSH36tXNxfLpwiMZZraHv9wUAwn7uqR-vgy9Ztu__CBMGCDMCvi8oAkpA56wj9AHeZjQg7GVRWpkJjHUXrvUHYcdvIwrNzUToidATpALiQYh9YRuxY03YMW8IO14zsCNEj2BHiEai0NyhBCXRBDUqdEBo_URofYf9KYad5OJwcVag9yvRUTkfVgHWQdyQ1PNXTANeFr_iuyYelDXwprSGkSu9oZorsx7gg40BSJX1_ZqTPoCx2_zpk8Id9f9s6oHUD3CDv4NYltTGsMQAKaTfGFT9kUF9f9-h-1f0my074a_PDT32F-jR5r9ZeRgc8hd_y8fjfrfWIMzcw17pHsLMA2hrX0CrF9ymB0LbPWAiOyZb1vIEu7xqi6KsiqJK5i6v2VDwKpNcUC6zQtZ1UTRlOTLZDKwcE9XRjLKszfO8oVlRHUopWV7wMR8awWWekSLDC1f6oPXr5WDdlCjvI3ZV2bY00XxA7bc2p9TgG2yLhNK16123nkmHOHlSZFr54D-jBBU0dv9y4azfqgzfF27k6qWBzw7fvCC0eY5rbbe3JZ9Ep7s5hMWvzUnPhJ4nFeY4HIS9EHpek11_6eLsM4pA6Hmj6Ak9bxJ-BAAA__8bk2Dc">