[PATCH] D110051: [clangd] Deduplicate inlay hints
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 20 07:26:51 PDT 2021
kadircet added a comment.
I am not aware of how the intersecting hints are handled in the implementation on the client side nor in the proposal today. After this patch we might still produce them if for whatever reason there are different kinds of hints for the same range. Is this OK?
================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:353
+ // template instantiations.
+ std::sort(Results.begin(), Results.end());
+ Results.erase(std::unique(Results.begin(), Results.end()), Results.end());
----------------
nit: You can just do `llvm::sort(Results)`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110051/new/
https://reviews.llvm.org/D110051
More information about the cfe-commits
mailing list