This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix compilation warning in check-directive-structure.h
ClosedPublic

Authored by tskeith on Aug 5 2020, 5:37 PM.

Details

Summary

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.

Diff Detail

Event Timeline

tskeith created this revision.Aug 5 2020, 5:37 PM
Herald added a project: Restricted Project. · View Herald Transcript
tskeith requested review of this revision.Aug 5 2020, 5:37 PM
klausler accepted this revision.Aug 5 2020, 5:42 PM
This revision is now accepted and ready to land.Aug 5 2020, 5:42 PM
This revision was landed with ongoing or failed builds.Aug 5 2020, 6:03 PM
This revision was automatically updated to reflect the committed changes.

Thanks for fixing this missed warnings. Sorry.