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2eO876cTftmeIts63S0tKBcd5rxbkeGBMNk0qJnZcKfNpj2BVjM1bkagLfMfTd_0fg9owyRptGNAMVfKz7BnVO1SD6hjbAedVSQCH7utipQzzskIdiEo_ihJPepZw-JiXei4cZYAWMCLPLHvbf4b1k8emfTgO8bq5XKkrpUn-7Fex-RfoXkiZNtA>53269</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Lexer/__has_declspec_attribute regression in Clang 14
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
lilianmoraru
</td>
</tr>
</table>
<pre>
Regression tracked to this commit: https://github.com/llvm/llvm-project/commit/2edb89c746848c52964537268bf03e7906bf2542#diff-d8dd6191130efea27aca1a54b23fc45eeeb1cc377147f9d6f5ec8b00ff56fafc
Confirmed that reverting `2edb89c746848c52964537268bf03e7906bf2542` on `d8e0e125a2ff03335838039f5d33ecd61dfec654`(`main` branch/clang 14) fixes the bug.
#### Description:
libcurl 7.78.0(the line was there for years, it's not specific to this version) fails to compile when consumed in a C++ project(unknown if specific to C++ - this was the initial setup when the issue was hit):
```
linux/include/curl/curl.h:120:41: error: too few arguments provided to function-like macro invocation
__has_declspec_attribute(dllimport))
^
```
Clang 13.0.1(`release/13.x` branch) works fine.
Clang 14(`d8e0e125a2ff03335838039f5d33ecd61dfec654`, branch `main`) fails.
This is the line upstream:
https://github.com/curl/curl/blob/bfbde883af33397943df68a3ae01847a634d33bf/include/curl/curl.h#L120
Attaching the libcurl source code used in the project(note: not building libcurl itself, just consuming the `curl.h` header):
[libcurl.zip](https://github.com/llvm/llvm-project/files/7890954/libcurl.zip)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVVU1z4ygQ_TXyhYoKgT7QwYdMsjnNaWvvKT4aiwkWLkBJZn_9NpLtOFU7sxsVBZKhu1-_fo1VMD_3f8IhQkouzCRHqV_AkBxInlwiOhyPLlf8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