[clang] Fix warnings on the missing of explicitly copy constructor on the base class...
authorMichael Liao <michael.hliao@gmail.com>
Tue, 20 Oct 2020 14:04:53 +0000 (10:04 -0400)
committerMichael Liao <michael.hliao@gmail.com>
Tue, 20 Oct 2020 14:06:24 +0000 (10:06 -0400)
clang/include/clang/Basic/Diagnostic.h
clang/include/clang/Basic/PartialDiagnostic.h

index f17b98f..3895e1f 100644 (file)
@@ -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;
index 9e01790..9ddf64d 100644 (file)
@@ -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();