[PATCH] D39050: Add index-while-building support to Clang
Nathan Hawes via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 13 13:43:00 PDT 2018
nathawes added a comment.
In https://reviews.llvm.org/D39050#1036249, @malaperle wrote:
> In https://reviews.llvm.org/D39050#1021204, @malaperle wrote:
> > For computing the start/end-loc of function bodies, I tried the SingleFileParseMode and SkipFunctionBodies separately ( as a start). The source I use this on looks like this:
> Given the discussion in https://reviews.llvm.org/D44247, I think we can do without the start/end-loc of function bodies and try some heuristics client-side. We can always revisit this later if necessary.
> However, for the end-loc of occurrences, would you be OK with this being added? I think it would be a good compromise in terms of performance, simplicity and index size.
@malaperle Just to clarify, what's the particular end-loc we're talking about here? e.g. for a function call, would this be the end of the function's name, or the closing paren?
For the end of the name, couldn't this be derived from the start loc + symbol name length (barring token pastes and escaped new lines in the middle of identifiers, which hopefully aren't too common)?
I can see the value for the closing paren though.
@akyrtzi Are the numbers from Marc-Andre's experiment what you'd expect to see and is there anything else to try? I'm not familiar with those modes at all to comment, sorry. I assume any API to gather syntactic structure info would be based on those modes, right?
More information about the cfe-commits