================
@@ -1887,7 +1887,19 @@ class CodeCompleteFlow {
         for (auto &Cand : C.first) {
           if (Cand.SemaResult &&
               Cand.SemaResult->Kind == CodeCompletionResult::RK_Declaration) {
-            auto ID = clangd::getSymbolID(Cand.SemaResult->getDeclaration());
+            const NamedDecl *DeclToLookup = Cand.SemaResult->getDeclaration();
+            // For instantiations of members of class templates, the
+            // documentation will be stored at the member's original
+            // declaration.
----------------
HighCommander4 wrote:

> but that still led me to 
> https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/ASTContext.cpp#L333-L401.
>  Can we just use that instead to unify behavior with AST-based 
> completion-comments here?

Done.

I chose `DeclTemplate.h` as the header to house the shared function, as it 
seemed like a better fit than `ASTContext.h`; let me know if you have a 
different preference.

https://github.com/llvm/llvm-project/pull/153337
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to