dang added inline comments.

================
Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:495
 
+    if (const auto *Method = dyn_cast<ObjCMethodRecord>(Member.get()))
+      serializeObject(*MemberRecord, "functionSignature",
----------------
zixuw wrote:
> I'd prefer not to use `dyn_cast` as `MemberTy` here is a concrete type. So 
> maybe a type trait `has_function_signature` and a `if constexpr`?
`if constexpr` is c++17 which we don't support yet? Anyway I added the type 
trait and implemented this a bit lower down the "stack" (in serializeAPIRecord) 
as there are multiple record types that have signatures. This is done using tag 
dispatch based on the trait.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123304

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

Reply via email to