aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/gc-alloc.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/gc-alloc.hh')
-rw-r--r--src/libexpr/gc-alloc.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libexpr/gc-alloc.hh b/src/libexpr/gc-alloc.hh
index fc034045f..afdd7eeb0 100644
--- a/src/libexpr/gc-alloc.hh
+++ b/src/libexpr/gc-alloc.hh
@@ -120,6 +120,7 @@ inline T * gcAllocType(size_t howMany = 1)
// However, people can and do request zero sized allocations, so we need
// to check that neither of our multiplicands were zero before complaining
// about it.
+ // NOLINTNEXTLINE(bugprone-sizeof-expression): yeah we only seem to alloc pointers with this. the calculation *is* correct though!
auto checkedSz = checked::Checked<size_t>(howMany) * sizeof(T);
size_t sz = checkedSz.valueWrapping();
if (checkedSz.overflowed()) {