Skip to content

Commit 41d7218

Browse files
committed
[Clang][Codegen][NFC] Apply rule of three to some classes
Static analysis flagged these classes as having implemented the destructor but not applying rule of three. This could lead to accidental misuse and so it makes sense to apply it.
1 parent 52c9489 commit 41d7218

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/CodeGen/CGDebugInfo.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,8 @@ class ApplyInlineDebugLocation {
977977
ApplyInlineDebugLocation(CodeGenFunction &CGF, GlobalDecl InlinedFn);
978978
/// Restore everything back to the original state.
979979
~ApplyInlineDebugLocation();
980+
ApplyInlineDebugLocation(const ApplyInlineDebugLocation &) = delete;
981+
ApplyInlineDebugLocation &operator=(ApplyInlineDebugLocation &) = delete;
980982
};
981983

982984
class SanitizerDebugLocation {
@@ -988,6 +990,8 @@ class SanitizerDebugLocation {
988990
ArrayRef<SanitizerKind::SanitizerOrdinal> Ordinals,
989991
SanitizerHandler Handler);
990992
~SanitizerDebugLocation();
993+
SanitizerDebugLocation(const SanitizerDebugLocation &) = delete;
994+
SanitizerDebugLocation &operator=(SanitizerDebugLocation &) = delete;
991995
};
992996

993997
} // namespace CodeGen

0 commit comments

Comments
 (0)