<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 14px; line-height: 23.239999771118164px;">Hi Everyone,
<p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;">I am using clang by libtooling, and meet something I can't figure out.</p><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;">As for the given example clang-check, when running on all files in a source tree, </p><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;">clang-check frequently produces a fatal error - cannot open file... </p><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;">But when I run those files one by one, clang-check perfectly works. By the way, </p><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;">there is a .json file in the top level of source tree.</p><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;"><br></p><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;">I also find that changing files order can influence the behavior of clang-check:</p><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;"><br></p><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;">*************************************************************************</p><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;">$ clang-check /home/jiazhouyang/httpd-2.4.10/server/mpm/event/event.c /home/jiazhouyang/httpd-2.4.10/os/unix/unixd.c
warning: argument unused during compilation: '-fsyntax-only'
</p><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;"><br></p><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px;"><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;">*************************************************************************</p></pre><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;"></p><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;">$ clang-check /home/jiazhouyang/httpd-2.4.10/os/unix/unixd.c /home/jiazhouyang/httpd-2.4.10/server/mpm/event/event.c</p>In file included from event.c:79:
/home/jiazhouyang/httpd-2.4.10/include/ap_config.h:136:10: fatal error: cannot open file './os.h': No such file or directory
#include "os.h"
^
1 error generated.
Error while processing /home/jiazhouyang/httpd-2.4.10/server/mpm/event/event.c.
warning: argument unused during compilation: '-fsyntax-only'
In file included from event.c:79:
/home/jiazhouyang/httpd-2.4.10/include/ap_config.h:136:10: fatal error: cannot open file './os.h': No such file or directory
#include "os.h"
^
1 error generated.
Error while processing /home/jiazhouyang/httpd-2.4.10/server/mpm/event/event.c.<p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;"></p><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px;"><p style="margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 1.5;">*************************************************************************</p></pre><pre>Any ideas what I am doing wrong?</pre><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px;">-regards,
Zhouyang</pre></pre>