Switch from assert to CHECK (#975)

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This commit is contained in:
Jon Meow
2021-12-08 08:38:27 -08:00
committed by GitHub
co-authored by Chandler Carruth
parent e727eb8fe6
commit a562f872e7
14 changed files with 101 additions and 76 deletions
+2 -1
View File
@@ -6,6 +6,7 @@
#include <cstdint>
#include <cstring>
#include "common/check.h"
#include "llvm/ADT/StringRef.h"
#include "toolchain/diagnostics/diagnostic_emitter.h"
#include "toolchain/diagnostics/null_diagnostics.h"
@@ -55,7 +56,7 @@ extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data,
// In the absence of parse errors, we should have exactly as many nodes as
// tokens.
assert(tree.Size() == tokens.Size() && "Unexpected number of tree nodes!");
CHECK(tree.Size() == tokens.Size()) << "Unexpected number of tree nodes!";
return 0;
}