| 1997 | |
| 1998 | |
| 1999 | std::pair<std::shared_ptr<QueryFuzzer>, std::unique_lock<std::mutex>> getGlobalASTFuzzer() |
| 2000 | { |
| 2001 | static std::mutex mutex; |
| 2002 | #if WITH_COVERAGE |
| 2003 | /// Under LLVM coverage builds we use a fixed seed so that the set of AST mutations |
| 2004 | /// (and therefore the set of branches taken inside `QueryFuzzer`) is stable run-to-run. |
| 2005 | /// Without this, coverage of `QueryFuzzer.cpp` and friends flickers between coverage runs. |
| 2006 | static std::shared_ptr<QueryFuzzer> fuzzer = std::make_shared<QueryFuzzer>(pcg64(0xC0FFEEULL)); |
| 2007 | #else |
| 2008 | static std::shared_ptr<QueryFuzzer> fuzzer = std::make_shared<QueryFuzzer>(randomSeed()); |
| 2009 | #endif |
| 2010 | return {fuzzer, std::unique_lock(mutex)}; |
| 2011 | } |
| 2012 | |
| 2013 | |
| 2014 | static bool isReadOnlyQuery(const ASTPtr & ast) |
no test coverage detected