<div dir="rtl"><div dir="ltr">Wild guess, try this patch:</div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr">Index: tools/clang/lib/Lex/HeaderSearch.cpp</div><div dir="ltr">===================================================================</div><div dir="ltr">--- tools/clang/lib/Lex/HeaderSearch.cpp<span class="" style="white-space:pre">   </span>(revision 222541)</div><div dir="ltr">+++ tools/clang/lib/Lex/HeaderSearch.cpp<span class="" style="white-space:pre">      </span>(working copy)</div><div dir="ltr">@@ -257,7 +257,7 @@</div><div dir="ltr">     return File;</div><div dir="ltr">   }</div><div dir="ltr"> </div><div dir="ltr">-  return HS.getFileMgr().getFile(FileName, /*openFile=*/true);</div><div dir="ltr">+  return HS.getFileMgr().getFile(FileName, /*openFile=*/false);</div><div dir="ltr"> }</div><div dir="ltr"> </div><div dir="ltr"> /// LookupFile - Lookup the specified file in this search path, returning it</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2014-12-06 12:01 GMT+02:00 Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So, I think the general problem is that Windows by default does not allow multiple applications to have a file open. The question is whether we could get libclang to read all the files into memory instead of keeping them open...<br><br><div class="gmail_quote">On Fri Dec 05 2014 at 10:13:08 PM Ivan Koster <<a href="mailto:ivankoster@gmail.com" target="_blank">ivankoster@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I was requested in <a href="https://github.com/Valloric/ycmd/issues/61" target="_blank">https://github.com/Valloric/ycmd/issues/61</a> to post about a file locking problem on windows. In that thread the suspicion was raised that libclang.dll locks header files for writing or delete.</div><div><br></div><div>I am writing a plugin that uses YCMD, which uses libclang to provide autocomplete and goto definition among other services.</div><div><br></div><div>To be completely honest, libclang and ycmd are a black box for me and I have no idea on their internals, how libclang.dll and YCMD interact or how to start debugging this.</div><div>In the above link you can find a .c and .h file that for me consistently lock the files on windows 7 64bit. Only very few header files of my projects get locked, and they all use a code construct as in the above provided .c and .h file. From my experimenting, the header file also seems to must be above a certain size for the lock to occur.</div><div><br></div><div>I'm hoping the above is sufficient to pin down the problem.</div><div>If more information is need I'm happy to help.</div><div><br></div><div>Greetings,</div><div><br></div><div>Ivan</div><div><br></div><div><br></div><div><br></div><div><br></div></div>
</blockquote></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>