[clang-tools-extra] [clang-doc] refactor JSONGenerator array usage (PR #145595)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 25 10:27:25 PDT 2025


================
@@ -278,6 +247,16 @@ static void serializeInfo(const ConstraintInfo &I, Object &Obj) {
   Obj["Expression"] = I.ConstraintExpr;
 }
 
+static void serializeInfo(const std::vector<TemplateParamInfo> &Params,
----------------
ilovepi wrote:

```suggestion
static void serializeInfo(ArrayRef<TemplateParamInfo> Params,
```
This should be more flexible, and will work with any kind of vector like container we use, like if we ever used SmallVector<T>.

https://github.com/llvm/llvm-project/pull/145595


More information about the cfe-commits mailing list