Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | ||
---|---|---|
512 | 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? |
Address code review feedback.
Introduce has_function_signature type trait to distinguish records that have a
function signatures.
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | ||
---|---|---|
512 | 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. |
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | ||
---|---|---|
512 | Hmm.. That's a bummer. Didn't realize that when I made the suggestion. I actually don't have that strong an opinion regarding the dyn_cast. |
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | ||
---|---|---|
512 | I think it is still worth it, so that we can emit function signatures in APIRecord as multiple types of records need them (and the list of records will keep growing). This could be a useful way of dealing with things like availability information as well. |
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?