[PATCH] D41537: Optionally add code completion results for arrow instead of dot
Ivan Donchevskii via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 21 01:42:25 PDT 2018
yvvan added inline comments.
================
Comment at: include/clang/Sema/CodeCompleteConsumer.h:565
+ /// \brief For this completion result correction is required.
+ Optional<std::string> Corr = None;
+
----------------
ilya-biryukov wrote:
> Having a string replacement without an actual range to replace still moves a lot of responsibility onto the clients. We should probably model corrections after the fix-its for diagnostics:
> - replacements need to provide a range to be replaced, alongside with a text for the replacement,
> - we should provide a list of edits to allow corrections that touch two separate pieces of code.
>
> For the fix-its in the diagnostics, see [[https://reviews.llvm.org/source/clang/browse/cfe/trunk/tools/libclang/CXLoadedDiagnostic.h;327861$84 | CXLoadedDiagnostic.h]] for an interface exported via libclang and [[https://reviews.llvm.org/source/clang/browse/cfe/trunk/include/clang/Basic/Diagnostic.h;327861$947|Diagnostic.h]] for an interface exported in C++ API.
> WDYT?
I thought that fixits always exist separately from diagnostics. I will check this out, thanks.
https://reviews.llvm.org/D41537
More information about the cfe-commits
mailing list