[clang] Delete copy constructor/assignment; NFC (PR #145689)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 25 05:19:06 PDT 2025


https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/145689

This is an RAII object and static analysis was flagging it for not following the rule of three (or five).

>From 14b233bdc512395b2ee8256894239b930421c736 Mon Sep 17 00:00:00 2001
From: Aaron Ballman <aaron at aaronballman.com>
Date: Wed, 25 Jun 2025 08:17:16 -0400
Subject: [PATCH] Delete copy constructor/assignment; NFC

This is an RAII object and static analysis was flagging it for not
following the rule of three (or five).
---
 clang/lib/CodeGen/CodeGenFunction.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 59f14b3e35fd0..6c32c98cec011 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -234,6 +234,9 @@ class ApplyAtomGroup {
   uint64_t OriginalAtom = 0;
   CGDebugInfo *DI = nullptr;
 
+  ApplyAtomGroup(const ApplyAtomGroup &) = delete;
+  void operator=(const ApplyAtomGroup &) = delete;
+
 public:
   ApplyAtomGroup(CGDebugInfo *DI);
   ~ApplyAtomGroup();



More information about the cfe-commits mailing list