From 02bac03162280236ef7a33993358cb7dcff443d1 Mon Sep 17 00:00:00 2001 From: Florent Revest Date: Wed, 21 Jan 2026 15:38:10 +0100 Subject: tools/clang/json: escape strings properly When preparing a codesearch index, I encountered errors which I narrowed down to lines like the following in the json output of codesearch: "type": "void (void __attribute__((btf_type_tag("user")))*, const void *, size_t, size_t)", After this change, the line gets formatted like this: "type": "void (void __attribute__((btf_type_tag(\"user\")))*, const void *, size_t, size_t)", This fixes the errors I encountered --- pkg/codesearch/testdata/query-file-index-source | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/codesearch/testdata/query-file-index-source') diff --git a/pkg/codesearch/testdata/query-file-index-source b/pkg/codesearch/testdata/query-file-index-source index af52513b7..edfe4616f 100644 --- a/pkg/codesearch/testdata/query-file-index-source +++ b/pkg/codesearch/testdata/query-file-index-source @@ -5,5 +5,6 @@ file source0.c defines the following entities: function close function func_accepting_a_struct function function_with_comment_in_header +function function_with_quotes_in_type function open struct struct_in_c_file -- cgit mrf-deployment