aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorShafik Yaghmour <shafik.yaghmour@intel.com>2025-05-01 07:51:58 -0700
committerGitHub <noreply@github.com>2025-05-01 07:51:58 -0700
commit47681736cbf6f32a70ca0aaf5d2671bc9c76112d (patch)
tree55eb2339657e00406ba1715a7554d885950fd65a /clang/lib/CodeGen/CodeGenFunction.h
parent38c283370121e8f41c5f7575b547511bdac0a702 (diff)
downloadllvm-47681736cbf6f32a70ca0aaf5d2671bc9c76112d.zip
llvm-47681736cbf6f32a70ca0aaf5d2671bc9c76112d.tar.gz
llvm-47681736cbf6f32a70ca0aaf5d2671bc9c76112d.tar.bz2
[Clang][NFC] Explicitly delete copy ctor and assignment for CGAtomicOptionsRAII (#137275)
Static analysis flagged CGAtomicOptionsRAII as having an explicit destructor but not having explicit copy ctor and assignment. Rule of three says we should. We are just using this as an RAII object, no need for either so they will be specified as deleted.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 4c5e8a8..561f8f6 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -869,6 +869,9 @@ public:
}
CGM.setAtomicOpts(AO);
}
+
+ CGAtomicOptionsRAII(const CGAtomicOptionsRAII &) = delete;
+ CGAtomicOptionsRAII &operator=(const CGAtomicOptionsRAII &) = delete;
~CGAtomicOptionsRAII() { CGM.setAtomicOpts(SavedAtomicOpts); }
private: