[PATCH] D53406: [clangd] Provide excuses for bad code completions, based on diagnostics. C++ API only.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 22 09:30:52 PDT 2018
kadircet added inline comments.
================
Comment at: clangd/CodeComplete.cpp:700
+ unsigned DiagLoc = Loc.second;
+ if (DiagLoc < StartOfLine || DiagLoc > Offset)
+ return;
----------------
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` ?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53406
More information about the cfe-commits
mailing list