Skip to content

Commit 87bd782

Browse files
authored
[LLVM][NFC] Fix Rule of Three/Five issues. (#160851)
Fix Rule of Three/Five issues reported by static analysis tool.
1 parent 38953f4 commit 87bd782

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

llvm/include/llvm/TextAPI/SymbolSet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ class SymbolSet {
9292

9393
public:
9494
SymbolSet() = default;
95+
SymbolSet(const SymbolSet &other) = delete;
96+
SymbolSet &operator=(const SymbolSet &other) = delete;
9597
LLVM_ABI ~SymbolSet();
9698
LLVM_ABI Symbol *addGlobal(EncodeKind Kind, StringRef Name, SymbolFlags Flags,
9799
const Target &Targ);

llvm/lib/CAS/InMemoryCAS.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class InMemoryObject {
5757
InMemoryObject() = delete;
5858
InMemoryObject(InMemoryObject &&) = delete;
5959
InMemoryObject(const InMemoryObject &) = delete;
60+
InMemoryObject &operator=(const InMemoryObject &) = delete;
61+
InMemoryObject &operator=(InMemoryObject &&) = delete;
62+
virtual ~InMemoryObject() = default;
6063

6164
protected:
6265
InMemoryObject(Kind K, const InMemoryIndexValueT &I) : IndexAndKind(&I, K) {}

0 commit comments

Comments
 (0)