<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/91911>91911</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
libclang macOS vs Windows versions produce substantial differences when parsing AST
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
georvn7
</td>
</tr>
</table>
<pre>
I use libclang for auto generated code reports.
**libclang macOS vs Windows versions produce substantial differences when parsing AST**
Here is the attached test file 'main.txt' repo file
[main.txt](https://github.com/llvm/llvm-project/files/15288946/main.txt)
Compile this file with whatever the versions of libclang and you will never get CXXForRangeStmt cursor on macOS
Here are both logs from macOS and Windows
[clang_test_macOS.txt](https://github.com/llvm/llvm-project/files/15288962/clang_test_macOS.txt)
[clang_test_Windows.txt](https://github.com/llvm/llvm-project/files/15288964/clang_test_Windows.txt)
Note how for the same source statements we have much verbose cursors on Windows. To me this is classifies as issue
<img width="1900" alt="libclang_macOSvsWindows" src="https://github.com/llvm/llvm-project/assets/164140000/8551be90-e8d7-4f65-ba59-6e0019e2aff3">
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0lE-PpDYQxT-NuZS6Zcy_5sBhdiYouSRSZqXsbWVMAY6M3XIVTfbbR9A9PdNKLivtSggk29R79Xu2NZEdPWIjik-ieEn0wlOIzYghXnyVdKH_1vwGCyE42xmn_QhDiKAXDjCix6gZezChR4h4DpHpCEK-CPl0e6vtuf87a_PHK1wI_rK-DyvBBSPZ4AnOMfSLQaClI9aerXbQ22HAiN4gwTqhh7OOZP0IT6-fr4UftH7FiGAJeELQzNpM2AMjMQzWIQhVzdr6I__DQlW73X3iVqL4dJ8tXoQ6TcxnEtmTUK1Q7Wh5WrqjCbNQrXOXt8_hHMPfaFiodqtFQrVpoU6nOi-Fat_16o9Gn8N83hzxZOnqbbU8wTppxgvGvYE7mDC8o9e-h29hgdU6B35fOyLD85cvbYh_aj_iK88MZokUIgR_5f0fRjoidIEncGEkGGKYb8Fs9W_J3Knsyl83jF_3RT-MUKmEav-3-p3Wg_rN2I_Tzx_1P9Z_zOv3wAhTWPetv4VDekagsMRtw7JmnNEzwYow6QvCvJhpC7ALhLcwaEvjTQE-B5hv8VsC47ZTOFgk0NsALfhwhLJnO4-w2p4nkb0IpdJaSqEUaMfXgbcNcmV4obcMlQKK5rrmu2lpIuQdV5mnuZSbZnsqirTDWh7w1FeHfCiLQ6eL-lCilGmNSg9DJpQS2S8fW0j6JuvrrNYJNmmVFkVZV2WZTA2iLNIhO5VllubmVBbDqepwkFqZ3lRVkdhGSZXLIs1kJmtVHjOjs6wbUjOYHDuZi1zirK07bu6PIY7JDrCp0zpNE6c7dLRfbkp5XG90ldruutjsHXfLSCKXzhLTexW27LD5CRcXJEt0zXensRvf0tgb-zcAAP__10Xdmw">