diff --git a/flang/lib/Semantics/check-directive-structure.h b/flang/lib/Semantics/check-directive-structure.h --- a/flang/lib/Semantics/check-directive-structure.h +++ b/flang/lib/Semantics/check-directive-structure.h @@ -34,13 +34,13 @@ // typename PC is the parser class defined in parse-tree.h for the clauses. template class DirectiveStructureChecker : public virtual BaseChecker { -public: +protected: DirectiveStructureChecker(SemanticsContext &context, std::unordered_map> directiveClausesMap) : context_{context}, directiveClausesMap_(directiveClausesMap) {} + virtual ~DirectiveStructureChecker() {} -protected: struct DirectiveContext { DirectiveContext(parser::CharBlock source, D d) : directiveSource{source}, directive{d} {}