[clang-tools-extra] 4c862da - [clangd] Avoid using constructor/destructor of vector<incomplete type>
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 29 00:30:14 PDT 2022
Author: Sam McCall
Date: 2022-09-29T09:30:03+02:00
New Revision: 4c862da8d43f32bed7ad7e3b700e01d04b3b0f8d
URL: https://github.com/llvm/llvm-project/commit/4c862da8d43f32bed7ad7e3b700e01d04b3b0f8d
DIFF: https://github.com/llvm/llvm-project/commit/4c862da8d43f32bed7ad7e3b700e01d04b3b0f8d.diff
LOG: [clangd] Avoid using constructor/destructor of vector<incomplete type>
This is formally invalid, and causes build errors when building with
clang in -std=c++20.
http://eel.is/c%2B%2Bdraft/vector.overview#4
Added:
Modified:
clang-tools-extra/clangd/support/Markup.cpp
clang-tools-extra/clangd/support/Markup.h
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/support/Markup.cpp b/clang-tools-extra/clangd/support/Markup.cpp
index 7f6eb31bcdd33..4d17a2bf2b2b8 100644
--- a/clang-tools-extra/clangd/support/Markup.cpp
+++ b/clang-tools-extra/clangd/support/Markup.cpp
@@ -393,6 +393,9 @@ void Paragraph::renderPlainText(llvm::raw_ostream &OS) const {
OS << '\n';
}
+BulletList::BulletList() = default;
+BulletList::~BulletList() = default;
+
void BulletList::renderMarkdown(llvm::raw_ostream &OS) const {
for (auto &D : Items) {
// Instead of doing this we might prefer passing Indent to children to get
diff --git a/clang-tools-extra/clangd/support/Markup.h b/clang-tools-extra/clangd/support/Markup.h
index 560071031e66a..3a869c49a2cbb 100644
--- a/clang-tools-extra/clangd/support/Markup.h
+++ b/clang-tools-extra/clangd/support/Markup.h
@@ -79,6 +79,9 @@ class Paragraph : public Block {
/// list like format, e.g. by prepending with "- " and indentation.
class BulletList : public Block {
public:
+ BulletList();
+ ~BulletList();
+
void renderMarkdown(llvm::raw_ostream &OS) const override;
void renderPlainText(llvm::raw_ostream &OS) const override;
std::unique_ptr<Block> clone() const override;
More information about the cfe-commits
mailing list