diff options
author | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2020-09-23 16:16:00 -0400 |
---|---|---|
committer | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2020-10-19 17:48:04 -0400 |
commit | 7e561b62d2f2140fcacfcdf78c42f01181fe0df5 (patch) | |
tree | ea43c82246e71d8c9ce85f13e8bff81ebffd05be /clang/lib/AST/DeclBase.cpp | |
parent | ea693a162786d933863ab079648d4261ac0ead47 (diff) | |
download | llvm-7e561b62d2f2140fcacfcdf78c42f01181fe0df5.zip llvm-7e561b62d2f2140fcacfcdf78c42f01181fe0df5.tar.gz llvm-7e561b62d2f2140fcacfcdf78c42f01181fe0df5.tar.bz2 |
[NFC] Refactor DiagnosticBuilder and PartialDiagnostic
PartialDiagnostic misses some functions compared to DiagnosticBuilder.
This patch refactors DiagnosticBuilder and PartialDiagnostic, extracts
the common functionality so that the streaming << operators are
shared.
Differential Revision: https://reviews.llvm.org/D84362
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r-- | clang/lib/AST/DeclBase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index ab2b55c..f2502c3 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -2027,9 +2027,9 @@ DependentDiagnostic *DependentDiagnostic::Create(ASTContext &C, // Allocate the copy of the PartialDiagnostic via the ASTContext's // BumpPtrAllocator, rather than the ASTContext itself. - PartialDiagnostic::Storage *DiagStorage = nullptr; + DiagnosticStorage *DiagStorage = nullptr; if (PDiag.hasStorage()) - DiagStorage = new (C) PartialDiagnostic::Storage; + DiagStorage = new (C) DiagnosticStorage; auto *DD = new (C) DependentDiagnostic(PDiag, DiagStorage); |