[PATCH] D140379: [clangd] Avoid triggering linkage computation for decl with unstable linkage in SymbolRelevanceSignals::computeASTSignals()

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 20 04:00:32 PST 2022


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Thanks!



================
Comment at: clang-tools-extra/clangd/Quality.cpp:306
   if (const NamedDecl *ND = SemaResult.getDeclaration()) {
+    if (hasUnstableLinkage(ND))
+      return;
----------------
nridge wrote:
> Would it be better to reuse [this getSymbolID overload](https://searchfox.org/llvm/rev/ec87b7231586865f7b0adfe22a0d056e40ae9264/clang-tools-extra/clangd/CodeComplete.cpp#606-621) instead? (Would require plumbing in a SourceManager to this call site.)
Ah, that requirement is unfortunate. It'd be nice if it worked but not worth changing signature I think.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140379/new/

https://reviews.llvm.org/D140379



More information about the cfe-commits mailing list