Skip to content

Commit

Permalink
Merge pull request #772 from Organ1sm/zig-update
Browse files Browse the repository at this point in the history
Update the latest zig
  • Loading branch information
Vexu authored Sep 20, 2024
2 parents 46f3995 + 6c4e218 commit 886921d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/aro/Preprocessor.zig
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ fn clearBuffers(pp: *Preprocessor) void {
pub fn expansionSlice(pp: *Preprocessor, tok: Tree.TokenIndex) []Source.Location {
const S = struct {
fn orderTokenIndex(context: Tree.TokenIndex, item: Tree.TokenIndex) std.math.Order {
return std.math.order(item, context);
return std.math.order(context, item);
}
};

Expand Down
7 changes: 4 additions & 3 deletions src/aro/Tokenizer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2151,12 +2151,13 @@ test "C23 keywords" {
}

test "Tokenizer fuzz test" {
return std.testing.fuzz(testTokenizerFuzz, .{});
}

fn testTokenizerFuzz(input_bytes: []const u8) anyerror!void {
var comp = Compilation.init(std.testing.allocator, std.fs.cwd());
defer comp.deinit();

const input_bytes = std.testing.fuzzInput(.{});
if (input_bytes.len == 0) return;

const source = try comp.addSourceFromBuffer("fuzz.c", input_bytes);

var tokenizer: Tokenizer = .{
Expand Down

0 comments on commit 886921d

Please sign in to comment.