<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/132663>132663</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
How to compile a single header file using libclang?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ChivenZhang
</td>
</tr>
</table>
<pre>
I used libclang to analyse a c++ header file, but It occurred an error code :4 after calling clang_TranslationUnit(...). However it entered visit phrase when passing a source file to analyse. So I want to know how to apply clang in header file only? Thanks for any help.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxUkU1v3CAQhn8NvoxirYdde33gkKSyknPTSy_VGMaGhgUL8K7231d2UjU9IfHx8jzzUs5uDsxKnJ7E6VtFa7ExqWfrrhx-WgpzNUZzV6-wZjbg3ag9hRlKBArk75mBQAt8EvgElslwgsl5FvgM41rgtUDUek2JDVAATikm0NEwCPl4BJoKJ9DkvQsz7NG_3hKF7Km4GH4EVwSe67oW2NfwEm985QSuAIfCW-bVZVdgsYkyw81ygGVTCjMQ5LgmzTvOF94avkd4hRuFsu2-h3gDG2_7jWXx9w8KcOGrDsTg70IO8GYpvGeYYgIKd7Dsl7oySppe9lSxarojdueuabrKKk16wrYZe8OTmSQeWmY8n00juTdNj5VTeMDTQeLxIGVzauvWdE3H3Zmmtj8fdSOOB76Q87X310sd01y5nFdWjcS2lZWnkX3eu0MMfIP9VCBuVSa1PXoY1zmL48G7XPK_mOKKZ_Xy4a3jZdkkCbbJef7PfN2n-bd4IYdqTV7ZUpYs5KPAQeAwu2LXsdbxInDY_vhcHpYUf7MuAoedLAscPtGvCv8EAAD__6sT08c">