From e40f4ccee2b6f849718b71d7a1cabc7268d219da Mon Sep 17 00:00:00 2001 From: Anna Rift Date: Tue, 18 Jun 2024 11:09:37 -0700 Subject: [PATCH] Assert setupModuleSearchPaths called before any other queries Signed-off-by: Anna Rift --- frontend/lib/parsing/parsing-queries.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/lib/parsing/parsing-queries.cpp b/frontend/lib/parsing/parsing-queries.cpp index c0df33d9e072..45bc3dd5e9e8 100644 --- a/frontend/lib/parsing/parsing-queries.cpp +++ b/frontend/lib/parsing/parsing-queries.cpp @@ -587,6 +587,9 @@ void setupModuleSearchPaths( const std::vector& prependStandardModulePaths, const std::vector& cmdLinePaths, const std::vector& inputFilenames) { + CHPL_ASSERT( + context->numQueriesRunThisRevision() == 0 && + "setupModuleSearchPaths should be called before any queries are run"); std::string modRoot; if (!minimalModules) {