translate-c: Correctly translate enum init values, addressing #1360 (#1377)

* translate-c: Correctly translate enum init values

* translate-c: Test enum initialization

* translate-c: Flip to positive using APSInt builtins

* src/translate_c.cpp: correctly bridge llvm::APSInt with Zig BigInt;

ACHTUNG: llvm::APSInt stores an int's sign inside of its getRawData; Internally to Zig we store an integer's sign outside of getRawData! (~aps_int) calls .flip() internally on the raw data to match Zig.

* test/translate_c.zig: enum: add wider range of values (u64) to try;

closes #1360
b8ce8f219cMichael Noronha committed on 8/20/2018, 6:29:26 PM· committed by Andrew Kelleyparent3ee1b60
2 files changedLine totals unavailable