translate-c: support brace-enclosed string initializers (c++20 9.4.2.1)

This commit is contained in:
kcbanner
2023-04-22 02:11:16 -04:00
committed by Veikka Tuominen
parent bc8e1e1de4
commit 42ee364e7b
5 changed files with 61 additions and 8 deletions

View File

@@ -3956,4 +3956,10 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
\\ .name = "foo",
\\});
});
cases.add("string array initializer",
\\static const char foo[] = {"bar"};
, &[_][]const u8{
\\pub const foo: [3:0]u8 = "bar";
});
}