llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[c-index-test] Fix JSON string quoting

Open Wilfred opened this issue 11 months ago • 5 comments

Previously, c-index-test assumed that all it could write strings to the JSON output directly. This breaks if any strings contain double-quotes or backslashes, which can occur for C++ string literals.

Ensure that strings are properly quoted for JSON, and add a test for string literals.

Wilfred avatar Jan 21 '25 23:01 Wilfred

@swift-ci please test llvm

drodriguez avatar Jan 31 '25 01:01 drodriguez

@swift-ci please smoke test

drodriguez avatar Jan 31 '25 01:01 drodriguez

@swift-ci please test llvm

drodriguez avatar Feb 12 '25 01:02 drodriguez

@swift-ci please smoke test

drodriguez avatar Feb 12 '25 01:02 drodriguez

Tests are passing on macOS and Linux, but looks like there's a pre-existing failure on Windows. I think this code is good to merge, but happy to make any changes you'd like.

Wilfred avatar Feb 19 '25 00:02 Wilfred