[PATCH] D123019: [clang][extract-api] Add support for typedefs

Zixu Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 5 12:33:07 PDT 2022


zixuw added inline comments.


================
Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:611
+
+  (*Typedef)["type"] = Record.UnderlyingType.USR;
+
----------------
Curious: where does this come from the format spec? Is this required/correctly populated?
I see a `type` property in https://github.com/apple/swift-docc-symbolkit/blob/0a45209833f4a151212c1aa38e13cfc03b9462e4/openapi.yaml#L239-L242, but couldn't determine if it means the underlying type for a typedef.
cc. @QuietMisdreavus 


================
Comment at: clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.cpp:15
+#include "TypedefUnderlyingTypeResolver.h"
+
+#include "clang/Index/USRGeneration.h"
----------------
nit: empty line


================
Comment at: clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.h:36
+
+  TypedefUnderlyingTypeResolver(ASTContext &Context) : Context(Context) {}
+
----------------
nit: `explicit`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123019



More information about the cfe-commits mailing list