From 06750948618f0486d05162d06544de69cc053ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 11 Aug 2025 09:27:18 +0200 Subject: [PATCH] Silence false positive clang-analyzer warning in repl.cc The clang-analyzer incorrectly flags a use-after-free for GC-managed objects when used with std::unique_ptr. Since NixRepl inherits from gc, its memory is properly managed by Boehm GC and this is a false positive. Added NOLINTNEXTLINE directive to suppress the warning. --- src/libcmd/repl.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index 8170bd579..001da4deb 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -917,6 +917,7 @@ ReplExitStatus AbstractNixRepl::runSimple( return values; }; LookupPath lookupPath = {}; + // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDelete) auto repl = std::make_unique( lookupPath, openStore(),