================
@@ -1069,6 +1071,27 @@ void SymbolCollector::addDefinition(const NamedDecl &ND,
   Symbol S = DeclSym;
   // FIXME: use the result to filter out symbols.
   S.Definition = *DefLoc;
+
+  std::string DocComment;
+  std::string Documentation;
+  if (!(S.Flags & Symbol::HasDocComment) &&
----------------
HighCommander4 wrote:

It's possible for both `addDeclaration()` and `addDefinition()` to be called 
for a given `Decl*` (if e.g. the definition is the first encountered 
declaration).

In such cases, if `addDeclaration()` failed to find a doc comment, we should 
probably avoid trying again in `addDefinition()` (since that will fail too and 
just run `CreateCodeCompletionString()` and `getDocComment()` needlessly).

https://github.com/llvm/llvm-project/pull/67802
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to