<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 15 August 2017 at 07:57, Vladimir Voskresensky via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF"><span class="gmail-">
<br>
<br>
<div class="gmail-m_22774614354463919moz-cite-prefix">On 14.08.2017 11:06, Ilya Biryukov
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">Could you provide more info,
please.<br>
Are USRs different for same named file-local entries
(i.e. static functions)?<br>
</div>
</blockquote>
<div><br>
</div>
<div>Looking at USRGenerator::VisitVarDecl, it seems they
will be the same across different translation units.</div>
<div>For local entities, "location" is part of the USR.
("Location" is a filename + an offset from the start of
that file).</div>
</div>
</div>
</div>
</blockquote></span>
That was my point, U in USRs are not so Unified, so can not be used
as universal keys for queries in DB.<br>
Adding location to USR makes them less usable in index if fast
incremental re-index is going to be implemented vs. full reparse on
each change.<br>
<br>
Vladimir.</div></blockquote><div><br></div><div>U is meant to be unique. USRs file-local declarations like static functions will include the filename only. USRs for function-local declarations will also include the offset in the file, but they're not actually indexed. There are a couple of global declarations that include file + offset in the USR as well - ObjC class extensions, some embedded tag decls (not that common), template parameter names (not actually indexed) & macros (not indexed).</div><div><br></div><div>What exactly prevents unique strings from being used as keys for queries?</div><div><br></div><div>Are filenames are a problem for the incremental re-indexing? If they aren't, then there are probably way to work around the file offsets in USRs for the incremental re-indexing, especially given how uncommon they actually are.</div><div><br></div><div>Alex</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br><span class="gmail-HOEnZb"><font color="#888888">
</font></span></div><span class="gmail-HOEnZb"><font color="#888888">
</font></span></div><span class="gmail-HOEnZb"><font color="#888888">
-- <br>
<div class="gmail-m_22774614354463919gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Regards,</div>
<div>Ilya Biryukov</div>
</div>
</div>
</div>
</div>
</font></span></div>
</div>
</blockquote>
<br>
</div>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>