@@ -45,7 +45,7 @@ static auto SerializeReferenceLambda = [](const auto &Ref, Object &Object) {
4545
4646static json::Object
4747serializeLocation (const Location &Loc,
48- const std::optional<StringRef> & RepositoryUrl) {
48+ const std::optional<StringRef> RepositoryUrl) {
4949 Object LocationObj = Object ();
5050 LocationObj[" LineNumber" ] = Loc.StartLineNumber ;
5151 LocationObj[" Filename" ] = Loc.Filename ;
@@ -169,7 +169,7 @@ static json::Value serializeComment(const CommentInfo &I) {
169169
170170static void
171171serializeCommonAttributes (const Info &I, json::Object &Obj,
172- const std::optional<StringRef> & RepositoryUrl) {
172+ const std::optional<StringRef> RepositoryUrl) {
173173 Obj[" Name" ] = I.Name ;
174174 Obj[" USR" ] = toHex (toStringRef (I.USR ));
175175
@@ -211,9 +211,9 @@ static void serializeReference(const Reference &Ref, Object &ReferenceObj) {
211211// differently. Only enums, records, and typedefs are handled here.
212212static void
213213serializeCommonChildren (const ScopeChildren &Children, json::Object &Obj,
214- const std::optional<StringRef> & RepositoryUrl) {
215- static auto SerializeInfo = [& RepositoryUrl](const auto &Info,
216- Object &Object) {
214+ const std::optional<StringRef> RepositoryUrl) {
215+ static auto SerializeInfo = [RepositoryUrl](const auto &Info,
216+ Object &Object) {
217217 serializeInfo (Info, Object, RepositoryUrl);
218218 };
219219
@@ -304,7 +304,7 @@ static void serializeInfo(const FieldTypeInfo &I, Object &Obj) {
304304}
305305
306306static void serializeInfo (const FunctionInfo &F, json::Object &Obj,
307- const std::optional<StringRef> & RepositoryURL) {
307+ const std::optional<StringRef> RepositoryURL) {
308308 serializeCommonAttributes (F, Obj, RepositoryURL);
309309 Obj[" IsStatic" ] = F.IsStatic ;
310310
@@ -459,7 +459,7 @@ static void serializeInfo(const RecordInfo &I, json::Object &Obj,
459459}
460460
461461static void serializeInfo (const VarInfo &I, json::Object &Obj,
462- const std::optional<StringRef> & RepositoryUrl) {
462+ const std::optional<StringRef> RepositoryUrl) {
463463 serializeCommonAttributes (I, Obj, RepositoryUrl);
464464 Obj[" IsStatic" ] = I.IsStatic ;
465465 auto TypeObj = Object ();
@@ -468,15 +468,15 @@ static void serializeInfo(const VarInfo &I, json::Object &Obj,
468468}
469469
470470static void serializeInfo (const NamespaceInfo &I, json::Object &Obj,
471- const std::optional<StringRef> & RepositoryUrl) {
471+ const std::optional<StringRef> RepositoryUrl) {
472472 serializeCommonAttributes (I, Obj, RepositoryUrl);
473473
474474 if (!I.Children .Namespaces .empty ())
475475 serializeArray (I.Children .Namespaces , Obj, " Namespaces" ,
476476 SerializeReferenceLambda);
477477
478- static auto SerializeInfo = [& RepositoryUrl](const auto &Info,
479- Object &Object) {
478+ static auto SerializeInfo = [RepositoryUrl](const auto &Info,
479+ Object &Object) {
480480 serializeInfo (Info, Object, RepositoryUrl);
481481 };
482482
0 commit comments