================
@@ -0,0 +1,99 @@
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_MD_PARSER_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_MD_PARSER_H
+#include "llvm/ADT/SmallString.h"
+#include "llvm/Support/Allocator.h"
+#include "llvm/Support/StringSaver.h"
+#include <list>
+
+using namespace llvm;
+
+namespace clang {
+namespace doc {
+using llvm::SmallString;
+enum class MDState { Emphasis, Strong, None };
+
+enum class MDType {
+ Paragraph,
+ Emphasis,
+ Strong,
+ Text,
+ Softbreak,
+};
+
+enum class MDTokenType { LeftDelimiterRun, RightDelimiterRun, Text };
+
+struct Node {
+ SmallVector<Node*> Children;
----------------
ilovepi wrote:
I see these get used elsewhere in an arena. This vector member will leak
memory, since it can own memory and the destructor won't get called when you
clear/reset/release the arena.
It can have a reference to something that owns the vector though, like a
hashtable or a context object that owns that hash table.
https://github.com/llvm/llvm-project/pull/155887
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits