Revert "Recommit [NFC] Refactor DiagnosticBuilder and PartialDiagnostic"
authorReid Kleckner <rnk@google.com>
Thu, 24 Sep 2020 18:14:05 +0000 (11:14 -0700)
committerReid Kleckner <rnk@google.com>
Thu, 24 Sep 2020 18:16:55 +0000 (11:16 -0700)
commitb62fd436a3e613cbfe0654305cbc0e4f142bfcf9
treef4e9432d390b84de3f8bbb718af06a33db78e2e6
parent3453b6928da332bb67f902add71f5cd80f61c136
Revert "Recommit [NFC] Refactor DiagnosticBuilder and PartialDiagnostic"

This reverts commit 8e780a1653e6f87755a447e921b8f929d8b70996.

DiagnosticBuilder is a value type, created on the stack everywhere. IMO
we should not be adding a vtable to it, and making very operator<< use a
virtual interface. There are other feasible designs for implementing
this. The original review, D84362, was approved by @tra, who is
responsible for Clang's CUDA support, but it wasn't reviewed by @rsmith
or anyone responsible for clang's diagnostic library.
20 files changed:
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/Attr.h
clang/include/clang/AST/CanonicalType.h
clang/include/clang/AST/Decl.h
clang/include/clang/AST/DeclCXX.h
clang/include/clang/AST/DeclarationName.h
clang/include/clang/AST/NestedNameSpecifier.h
clang/include/clang/AST/TemplateBase.h
clang/include/clang/AST/TemplateName.h
clang/include/clang/AST/Type.h
clang/include/clang/Basic/Diagnostic.h
clang/include/clang/Basic/PartialDiagnostic.h
clang/include/clang/Sema/Ownership.h
clang/include/clang/Sema/ParsedAttr.h
clang/include/clang/Sema/Sema.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/DeclCXX.cpp
clang/lib/AST/TemplateBase.cpp
clang/lib/AST/TemplateName.cpp
clang/lib/Basic/Diagnostic.cpp