<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/134510>134510</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
__has_include should not error if unevaluated
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kyuupichan
</td>
</tr>
</table>
<pre>
If /tmp/unreadable.cpp is unreadable (e.g. because chmod a-r) then clang gives a fatal error on this conditional. GCC gets this right and is silent only because the __has_include is unevaluated.
#if 0 && __has_include("/tmp/unreadable.cpp")
#endif
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0kduK2zAQhp9Gvhli5LGd2Be62O7i0qcIY2tsqVUko0NK3r7kQLd7URAI9DPffJqhlOzmmZXov4n-o6KSTYjq162U3S6GfDUHfVM_VhA45csucCo-MmmaHdfLvoNN8PkCAgeutxpmXqgkhsVcggY6RIEjZMMeFkd-g81eOQHBSpkccIwhQvCQjU2wBK9ttsGTqwG-v7_Dxjk9s2g3k4G8vvdN1rHPELy7_W2YDcP5bCidrV9c0fwU5Cu5Qpl1LeTb_WBrV5Ag8Cjw-LVC4CAQ__PfRzI-Cey1XZ-8SqtWj-1IFavm1LXDcGrkWBnVzETYHnld57HDmbuex07qVrIe5k6fKqtQYi872WMjeznU43GU-tQta6cRjzyKTvKFrKudu17qELfKplRYNW3XN7JyNLNLj_0hev4Nj_Su2X9UUd2LDnPZkuiksymnT0y22bH6OqxkQnEafMivpdj13-lVJTplct6TaN8ETgKnzWZT5noJF4HTnf26DnsMP3nJAqeHURI4vZSvCv8EAAD__4yXzl0">