From 5817c2844cdf8e07bb8858ae5a7ff81e6a610cf7 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Thu, 5 Dec 2024 00:01:17 -0800 Subject: [PATCH] [libclc][BumpPointerAllocator] fix coverity issue: Rule Of Three Add copy constructor and copy assignment operator. --- libclc/utils/libclc-remangler/LibclcRemangler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libclc/utils/libclc-remangler/LibclcRemangler.cpp b/libclc/utils/libclc-remangler/LibclcRemangler.cpp index fe4fd0609750b..f9006d32c4db4 100644 --- a/libclc/utils/libclc-remangler/LibclcRemangler.cpp +++ b/libclc/utils/libclc-remangler/LibclcRemangler.cpp @@ -105,6 +105,8 @@ class BumpPointerAllocator { public: BumpPointerAllocator() : BlockList(new(InitialBuffer) BlockMeta{nullptr, 0}) {} + BumpPointerAllocator(const BumpPointerAllocator &) = delete; + BumpPointerAllocator &operator=(const BumpPointerAllocator &) = delete; void *allocate(size_t N) { N = (N + 15u) & ~15u;