================
@@ -441,10 +442,14 @@ serializeCommonChildren(const ScopeChildren &Children, 
json::Object &Obj,
   }
 }
 
+static void customize(Object &Obj, size_t Size) {
+  Obj["VerticalDisplay"] = Size > 2;
+}
+
 template <typename Container, typename SerializationFunc>
-static void serializeArray(const Container &Records, Object &Obj,
-                           const std::string &Key,
-                           SerializationFunc SerializeInfo) {
+static void serializeArray(const Container &Records, Object &Obj, StringRef 
Key,
+                           SerializationFunc SerializeInfo, StringRef EndKey,
+                           void (*Customize)(Object &Obj, size_t Size)) {
----------------
ilovepi wrote:

I don't see us use a ton of raw function pointers in LLVM for callbacks. I 
think I typically we end up using std::function. I also don't expect a generic 
callback to require Size, which you could just capture in a lambda.

https://github.com/llvm/llvm-project/pull/181417
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to