<div dir="ltr"><div><div>I found the problem. For some reason there was a compilation database sitting inside the modules/http subdirectory, with missing compile commands. I just removed it and let clang tooling pick the commands from the base directory's compilation database, which has the complete set of compile commands.<br>...<br></div>the other compilation database might have been added inside the subdirectory by me for testing and I forgot about it :)<br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 7, 2014 at 11:19 AM, Frederico Araujo <span dir="ltr"><<a href="mailto:araujof@gmail.com" target="_blank">araujof@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Dear list,<br><br></div>I used Clang tooling to build a source code rewriter for a project I'm working on. I notice that some compile commands are not found in my compilation database (while others are). I couldn't figure out any particular differences between them. For example, the below test case does not work:<br></div><div><br></div><div>./mytool /home/frederico/dev/tests/llvm/httpd/modules/http/http_protocol.c</div><div><br>It returns the message "Skipping /home/frederico/dev/tests/llvm/httpd/modules/http/http_protocol.c. Compile command not found."<br><br></div>Inside my compile_commands.json, I have the entry:<br><br>{<br> "directory": "/home/frederico/dev/tests/llvm/httpd/modules/http",<br> "command": "clang -fsanitize=dataflow -mllvm -dfsan-combine-pointer-labels-on-store -I/usr/local/llvm/cmakebuild/lib/clang/3.5.0/include/ -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/home/frederico/dev/tests/llvm/httpd/os/unix -I/home/frederico/dev/tests/llvm/httpd/include -I/home/frederico/dev/tests/llvm/httpd/srclib/apr/include -I/home/frederico/dev/tests/llvm/httpd/srclib/apr-util/include -I/home/frederico/dev/tests/llvm/httpd/srclib/apr-util/xml/expat/lib -I/usr/local/pcre/include -I/home/frederico/dev/tests/llvm/httpd/modules/aaa -I/home/frederico/dev/tests/llvm/httpd/modules/cache -I/home/frederico/dev/tests/llvm/httpd/modules/core -I/home/frederico/dev/tests/llvm/httpd/modules/database -I/home/frederico/dev/tests/llvm/httpd/modules/filters -I/home/frederico/dev/tests/llvm/httpd/modules/ldap -I/home/frederico/dev/tests/llvm/httpd/modules/loggers -I/home/frederico/dev/tests/llvm/httpd/modules/lua -I/home/frederico/dev/tests/llvm/httpd/modules/proxy -I/home/frederico/dev/tests/llvm/httpd/modules/session -I/home/frederico/dev/tests/llvm/httpd/modules/ssl -I/home/frederico/dev/tests/llvm/httpd/modules/test -I/home/frederico/dev/tests/llvm/httpd/server -I/home/frederico/dev/tests/llvm/httpd/modules/arch/unix -I/home/frederico/dev/tests/llvm/httpd/modules/dav/main -I/home/frederico/dev/tests/llvm/httpd/modules/generators -I/home/frederico/dev/tests/llvm/httpd/modules/mappers -c http_protocol.c -o http_protocol.o",<br> "file": "/home/frederico/dev/tests/llvm/httpd/modules/http/http_protocol.c"<br>}<br><br></div>Any ideas? Could this be a bug in my version (3.5) of clang?<br><br></div>Thanks!<br></div>Fred<br></div>
</blockquote></div><br></div></div></div>