aboutsummaryrefslogtreecommitdiff
path: root/test/cases/translate_c
AgeCommit message (Collapse)Author
2025-09-24delete all the translate-c testsAndrew Kelley
the ziglang/translate-c package has its own test suite, so these are redundant
2025-05-07translate-c: fix callconv attribute in macroxdBronch
2025-04-07Make translate-c more robust in handling macro functions.Matthew Roush
Translate-c didn't properly account for C macro functions having parameter names that are C keywords. So something like `#define FOO(float) ((float) + 10)` would've been interpreted as casting `+10` to a `float` type, instead of adding `10` to the parameter `float`. An example of a real-world macro function like this is SDL3's `SDL_DEFINE_AUDIO_FORMAT` from `SDL_audio.h`, which uses `signed` as a parameter.
2025-03-07aro_translate_c: fix ast lowering of continue nodeTechatrix
fixes #22601
2024-10-19test: update for `CallingConvention` changesmlugg
This also includes some compiler and std changes to correct error messages which weren't properly updated before.
2024-08-27translate-c: support GCC/Clang pointer subtraction extensionmlugg
Pointer subtraction on `void *` or function pointers is UB by the C spec, but is permitted by GCC and Clang as an extension. So, avoid crashing translate-c in such cases, and follow the extension behavior -- there's nothing else that could really be intended.
2024-07-31aro_translate_c: do not translate atomic typesEvan Haas
2024-07-31aro_translate_c: move noreturn test to manifestEvan Haas
2024-07-31aro_translate_c: handle opaque struct defs in prototypesEvan Haas
2024-07-31aro_translate_c: move simple function prototype test to manifestEvan Haas
2024-07-31translate_c: move empty declaration test to test manifestEvan Haas
2024-07-31aro_translate_c: Make function decls publicEvan Haas
2024-07-29aro_translate_c: do not translate _Static_assert declarationsEvan Haas
This does not completely ignore static asserts - they are validated by aro during parsing; any failures will render an error and non-zero exit code. Emit a warning comment that _Static_asserts are not translated - this matches the behavior of the existing clang-based translate-c. Aro currently does not store source locations for _Static_assert declarations so I've hard-coded token index 0 for now.
2024-06-05translate-c: promote macros that reference var decls to inline functionsfreakmangd
2024-05-09aro translate-c: support for record types addedfebruary cozzocrea
2024-04-12translate-c: allow str literals in bool expressionstravisstaloch
this is a follow up to #19610 with fix suggested by Vexu in https://github.com/ziglang/zig/issues/14642#issuecomment-2048999384
2024-04-11translate-c: support macro with 'assert(false && "error message")'travisstaloch
closes #14642 with modified fix suggested by Vexu in https://github.com/ziglang/zig/issues/14642#issuecomment-1775476042
2024-03-28add tests for fixed stage1 bugsVeikka Tuominen
Closes #10357 Closes #11236 Closes #11615 Closes #12055
2024-03-26translate-c: handle string concatenation of function callsHydroH
2024-01-31Use mem.zeroes for empty union initializer listdanielsan901998
2023-11-24translate-c: use struct_init_one for empty struct initializerGarrett
2023-10-17tests: translate-c and run-translated-c to the test harnessVeikka Tuominen