ilya-biryukov added inline comments.
================ Comment at: clangd/CodeComplete.cpp:700 + unsigned DiagLoc = Loc.second; + if (DiagLoc < StartOfLine || DiagLoc > Offset) + return; ---------------- kadircet wrote: > There are also a lot of cases where we can't find an include file(usually due > to confused compile commands) and fail miserably. Maybe in addition to > checking current line, we could also check for lines that are starting with > `#include` or diags of type `diag::err_pp_file_not_found` ? Good point! It's even more complicated than that: some of those missing files might be in preamble. This will lead to preamble being incomplete. The problem with that is that DiagnosticsConsumer we create for completion will not see those errors (we have a separate consumer instance for preamble). So we also need to a way to keep the reason why preamble is broken in the preamble itself. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53406 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits