zixuw added inline comments.

================
Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:15
+#include "TypedefUnderlyingTypeResolver.h"
+
 #include "clang/ExtractAPI/DeclarationFragments.h"
----------------
Empty line


================
Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:598-605
+  // Typedefs of anonymous types have their entries unified with the underlying
+  // type.
+  bool ShouldDrop = Record.UnderlyingType.Name.empty();
+  // enums declared with `NS_OPTION` have a named enum and a named typedef, 
with
+  // the same name
+  ShouldDrop |= (Record.UnderlyingType.Name == Record.Name);
+  if (ShouldDrop)
----------------
Consider move the should-drop logic into 
`SymbolGraphSerializer::shouldSkip(const APIRecord &Record) const` so that we 
have a central place to see and manage which symbols get skipped.
This would also simplify things here as the filtering will automatically get 
handled in the following `serializeAPIRecord(Record)` line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123019

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

Reply via email to