zyounan added a comment.

> According to documentation of noteBottomOfStack, those should be tied to 
> thread creation, i.e. main and AsyncTaskRunner are two most common entry 
> points for threads that do parsing.

Yeah, I was about to put this call there. But they both boil down to the single 
`ParsedAST::build()`, right? (Admittedly, this breaks the "encapsulation" if we 
say 'the build process for AST should not bring any other side effects besides 
the AST itself', and this doesn't adhere to the document that it should be 
created at the beginning of the thread/program.)

> Currently the code in CompilerInstance::ExecuteAction seems to acknowledge 
> that there should be a fallback. I'm suggesting to move this fallback down to 
> a function that actually runs parsing.

Upon the implementation, the result will be more accurate if it occurs earlier 
before diving into parsing. Maybe we can do both, that put this call at clangd 
site and libclang's `ASTFrontendAction::ExecuteAction`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158967/new/

https://reviews.llvm.org/D158967

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to