[llvm] 87bd782 - [LLVM][NFC] Fix Rule of Three/Five issues. (#160851)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 29 10:32:22 PDT 2025
Author: Marcos Maronas
Date: 2025-09-29T18:32:18+01:00
New Revision: 87bd7825902ec378d4f6372c2463e51f5df69fc3
URL: https://github.com/llvm/llvm-project/commit/87bd7825902ec378d4f6372c2463e51f5df69fc3
DIFF: https://github.com/llvm/llvm-project/commit/87bd7825902ec378d4f6372c2463e51f5df69fc3.diff
LOG: [LLVM][NFC] Fix Rule of Three/Five issues. (#160851)
Fix Rule of Three/Five issues reported by static analysis tool.
Added:
Modified:
llvm/include/llvm/TextAPI/SymbolSet.h
llvm/lib/CAS/InMemoryCAS.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/TextAPI/SymbolSet.h b/llvm/include/llvm/TextAPI/SymbolSet.h
index 42c411acb6f9d..22f4124f40313 100644
--- a/llvm/include/llvm/TextAPI/SymbolSet.h
+++ b/llvm/include/llvm/TextAPI/SymbolSet.h
@@ -92,6 +92,8 @@ class SymbolSet {
public:
SymbolSet() = default;
+ SymbolSet(const SymbolSet &other) = delete;
+ SymbolSet &operator=(const SymbolSet &other) = delete;
LLVM_ABI ~SymbolSet();
LLVM_ABI Symbol *addGlobal(EncodeKind Kind, StringRef Name, SymbolFlags Flags,
const Target &Targ);
diff --git a/llvm/lib/CAS/InMemoryCAS.cpp b/llvm/lib/CAS/InMemoryCAS.cpp
index 255b89c15c4c5..c63ee70de0849 100644
--- a/llvm/lib/CAS/InMemoryCAS.cpp
+++ b/llvm/lib/CAS/InMemoryCAS.cpp
@@ -57,6 +57,9 @@ class InMemoryObject {
InMemoryObject() = delete;
InMemoryObject(InMemoryObject &&) = delete;
InMemoryObject(const InMemoryObject &) = delete;
+ InMemoryObject &operator=(const InMemoryObject &) = delete;
+ InMemoryObject &operator=(InMemoryObject &&) = delete;
+ virtual ~InMemoryObject() = default;
protected:
InMemoryObject(Kind K, const InMemoryIndexValueT &I) : IndexAndKind(&I, K) {}
More information about the llvm-commits
mailing list