dang added inline comments.

================
Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:537-544
+  generatePathComponents(Record, API,
+                         [Lang, &ParentContexts](const PathComponent &PC) {
+                           ParentContexts.push_back(
+                               serializeParentContext(PC, Lang));
+                         });
+
+  // The last component would be the record itself so let's remove it.
----------------
bnbarham wrote:
> It's not really clear to me what the intended behavior was meant to be here, 
> ie. whether if any parent fails we skip writing all *or* if we should be 
> writing all valid parents. I'll leave that to someone that knows more about 
> the symbolgraph output.
> 
> But this fixes the obvious crash, so that part is fine with me.
I think it is a bit of a grey area, having parent contexts and related symbols 
allows downstream clients to perform link resolution on declaration fragment 
chunks e.t.c I figured it would be best to do a best effort and provide the 
known parents.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142101

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to