[PATCH] D97803: [clangd] Overload bundles are only deprecated if each overloads is.
Kirill Bobyrev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 4 01:56:22 PST 2021
kbobyrev added a comment.
So, if my understanding is correct, this will make the whole bundle non-deprecated if at least one overload is not deprecated? This is probably an improvement over the existing behaviour. However, do we maybe want to split the bundles into deprecated and non-deprecated groups?
================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:410
+ if (Completion.Deprecated) {
+ Completion.Deprecated =
+ (C.SemaResult &&
----------------
The comment you added says "cleared" which means this should probably be `|=` rather than `=`, right?
Also, I this looks longer but probably more readable at least for me.
Also, the sources might be `SemaResult`, `IndexResult` or `IdentifierResult`, right? :( Otherwise could've been `Completion.Deprecated |= C.SemaResult ? C.SemaResult->Availability == CXAvailability_Deprecated : C.IndexResult->Flags & Symbol::Deprecated;`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97803/new/
https://reviews.llvm.org/D97803
More information about the cfe-commits
mailing list