[clang] 1ed506d - [clang] Fix warnings on the missing of explicitly copy constructor on the base class. NFC.
Michael Liao via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 20 07:06:45 PDT 2020
Author: Michael Liao
Date: 2020-10-20T10:06:24-04:00
New Revision: 1ed506deaddb41870d22f5b48d52ba710e8d6c00
URL: https://github.com/llvm/llvm-project/commit/1ed506deaddb41870d22f5b48d52ba710e8d6c00
DIFF: https://github.com/llvm/llvm-project/commit/1ed506deaddb41870d22f5b48d52ba710e8d6c00.diff
LOG: [clang] Fix warnings on the missing of explicitly copy constructor on the base class. NFC.
Added:
Modified:
clang/include/clang/Basic/Diagnostic.h
clang/include/clang/Basic/PartialDiagnostic.h
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/Diagnostic.h b/clang/include/clang/Basic/Diagnostic.h
index f17b98f74038..3895e1f45894 100644
--- a/clang/include/clang/Basic/Diagnostic.h
+++ b/clang/include/clang/Basic/Diagnostic.h
@@ -1284,7 +1284,7 @@ class DiagnosticBuilder : public StreamingDiagnostic {
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 9e017902b120..9ddf64d2de2c 100644
--- a/clang/include/clang/Basic/PartialDiagnostic.h
+++ b/clang/include/clang/Basic/PartialDiagnostic.h
@@ -49,7 +49,8 @@ class PartialDiagnostic : public StreamingDiagnostic {
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();
More information about the cfe-commits
mailing list