Skip to content

Commit e911717

Browse files
authored
[SYCL][ESIMD][NFCI] Fix coverity issues in use of demangler (#15731)
Need to follow rule of three since there is a user defined destructor, the copy constructor is called never hit at runtime, the copy assignment constructor is never called. Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
1 parent 8e2a3ad commit e911717

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/include/llvm/SYCLLowerIR/ESIMD/ESIMDUtils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Type *getVectorTyOrNull(StructType *STy);
6161
class SimpleAllocator {
6262
protected:
6363
SmallVector<void *, 128> Ptrs;
64+
SimpleAllocator &operator=(const SimpleAllocator &) = delete;
6465

6566
public:
6667
void reset() {
@@ -84,6 +85,10 @@ class SimpleAllocator {
8485
return Ptr;
8586
}
8687

88+
SimpleAllocator() = default;
89+
SimpleAllocator(const SimpleAllocator &) : SimpleAllocator() {
90+
assert(false && "Unreachable");
91+
}
8792
~SimpleAllocator() { reset(); }
8893
};
8994

0 commit comments

Comments
 (0)