[vtk-developers] Overriding member functions warnings with recent versions of clang/LLVM.
Sean McBride
sean at rogue-research.com
Wed Jun 1 10:48:02 EDT 2016
On Wed, 1 Jun 2016 09:44:29 +1000, Andrew Maclean said:
>If you build VTK on OX X El Capitan with LLVM 7.3.0 you will get lots of
>these warnings:
>-------
>warning: 'PrintSelf' overrides a member function but is not marked
>'override' [-Winconsistent-missing-override]
>
> virtual void PrintSelf(ostream& os, vtkIndent indent);
>-------
>To suppress them just add:
>-Wno-inconsistent-missing-override to CMAKE_CXX_FLAGS.
>
>Apparently the -Winconsistent-missing-override flag now automatically gets
>added with -Wall on recent versions of clang.
Andrew,
The warning has been default for a while now, you're seeing them now because I merged the first use of 'override' in VTK a while ago, as discussed on this list. Until VTK fully uses 'override' everywhere as appropriate, you'll need to disable that warning.
I'm investigating using clang-tidy's modernize-use-override to automate it:
<http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html>
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtk-developers
mailing list