From 051c03f0e0610c616c0ca5ee4cc3d37196cd52a3 Mon Sep 17 00:00:00 2001 From: MikePopoloski Date: Tue, 26 Nov 2024 08:53:41 -0500 Subject: [PATCH] Make fuzz target set diagnostic error limit to speed up iteration time --- tools/driver/slang_main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/driver/slang_main.cpp b/tools/driver/slang_main.cpp index 0a08d7a59..607d6450e 100644 --- a/tools/driver/slang_main.cpp +++ b/tools/driver/slang_main.cpp @@ -215,6 +215,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { auto tree = SyntaxTree::fromFileInMemory(text, sourceManager); DiagnosticEngine diagEngine(sourceManager); + diagEngine.setErrorLimit(10); + auto diagClient = std::make_shared(); diagEngine.addClient(diagClient);