From 1ed506deaddb41870d22f5b48d52ba710e8d6c00 Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Tue, 20 Oct 2020 10:04:53 -0400 Subject: [PATCH] [clang] Fix warnings on the missing of explicitly copy constructor on the base class. NFC. --- clang/include/clang/Basic/Diagnostic.h | 2 +- clang/include/clang/Basic/PartialDiagnostic.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/Basic/Diagnostic.h b/clang/include/clang/Basic/Diagnostic.h index f17b98f..3895e1f 100644 --- a/clang/include/clang/Basic/Diagnostic.h +++ b/clang/include/clang/Basic/Diagnostic.h @@ -1284,7 +1284,7 @@ protected: public: /// Copy constructor. When copied, this "takes" the diagnostic info from the /// input and neuters it. - DiagnosticBuilder(const DiagnosticBuilder &D) { + DiagnosticBuilder(const DiagnosticBuilder &D) : StreamingDiagnostic(D) { DiagObj = D.DiagObj; DiagStorage = D.DiagStorage; IsActive = D.IsActive; diff --git a/clang/include/clang/Basic/PartialDiagnostic.h b/clang/include/clang/Basic/PartialDiagnostic.h index 9e01790..9ddf64d 100644 --- a/clang/include/clang/Basic/PartialDiagnostic.h +++ b/clang/include/clang/Basic/PartialDiagnostic.h @@ -49,7 +49,8 @@ public: PartialDiagnostic(unsigned DiagID, DiagStorageAllocator &Allocator_) : StreamingDiagnostic(Allocator_), DiagID(DiagID) {} - PartialDiagnostic(const PartialDiagnostic &Other) : DiagID(Other.DiagID) { + PartialDiagnostic(const PartialDiagnostic &Other) + : StreamingDiagnostic(Other), DiagID(Other.DiagID) { Allocator = Other.Allocator; if (Other.DiagStorage) { DiagStorage = getStorage(); -- 2.7.4