mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 20:16:03 +01:00
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.
This commit is contained in:
parent
e7af2e6566
commit
0675094861
1 changed files with 1 additions and 0 deletions
|
|
@ -917,6 +917,7 @@ ReplExitStatus AbstractNixRepl::runSimple(
|
||||||
return values;
|
return values;
|
||||||
};
|
};
|
||||||
LookupPath lookupPath = {};
|
LookupPath lookupPath = {};
|
||||||
|
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDelete)
|
||||||
auto repl = std::make_unique<NixRepl>(
|
auto repl = std::make_unique<NixRepl>(
|
||||||
lookupPath,
|
lookupPath,
|
||||||
openStore(),
|
openStore(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue