[Remarks] Fix mismatched delete due to missing virtual destructor

This fixes an asan failure introduced in r356519.

llvm-svn: 356583
This commit is contained in:
Jordan Rupprecht 2019-03-20 17:44:24 +00:00
parent dfe137c4db
commit 1994dd4be1

View File

@ -19,6 +19,10 @@ namespace remarks {
struct ParserImpl {
enum class Kind { YAML };
explicit ParserImpl(Kind TheParserKind) : ParserKind(TheParserKind) {}
// Virtual destructor prevents mismatched deletes
virtual ~ParserImpl() {}
// The parser kind. This is used as a tag to safely cast between
// implementations.
Kind ParserKind;