llvm-dcpu16 / clang

Clang frontend that supports DCPU16
Other
22 stars 6 forks source link

Fix an assert that checks for CharWidth == 8 #3

Closed Blei closed 12 years ago

Blei commented 12 years ago

There is a warning that the current implementation is 8bit specific, but I didn't actually see why. This most likely means I overlooked something and stuff will break later...

ghost commented 12 years ago

Did you try to do something like?

char[5] string;
string[0] = 'm';

Because I got the same error earlier this day and wondered too. But I think this patch is okay.

krasin commented 12 years ago

Thanks for the fix.

Would you like to add the test to Clang with the string literal as well? There's one Clang/DCPU16 test in tools/clang/test/Driver/dcpu16.cpp but you should probably put the test into test/Lexer (I'm not sure, though)

krasin commented 12 years ago

The comment about the test is optional. The change looks good to me, feel free to merge.

Blei commented 12 years ago

Test has been added.

ghost commented 12 years ago

LGTM

krasin commented 12 years ago

Thanks!