[flang] Fix compilation warning in check-directive-structure.h
authorTim Keith <tkeith@nvidia.com>
Thu, 6 Aug 2020 01:03:40 +0000 (18:03 -0700)
committerTim Keith <tkeith@nvidia.com>
Thu, 6 Aug 2020 01:03:41 +0000 (18:03 -0700)
commit6d2d73059fda5a63f2b34a9482acc0445e0956a4
treeefe38ba5dfb354896c23fc5bc0fe9cadc32014a9
parent9f717d7b941fbc42bef017b84c4dd0f65ce06e7a
[flang] Fix compilation warning in check-directive-structure.h

Clang 9 gets the following warning after revision `D85104`.
```
../../flang/lib/Semantics/check-directive-structure.h:36:7: error: 'Fortran::semantics::DirectiveStructureChecker<llvm::omp::Directive, llvm::omp::Clause, Fortran::parser::OmpClause, 77>' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
```

The fix is the make the destructor virtual. Neither it nor the
constructor need to be public, so make them protected.

Differential Revision: https://reviews.llvm.org/D85383
flang/lib/Semantics/check-directive-structure.h