[cfe-dev] -Wnon-virtual-dtor is now very noisy on LLVM/Clang codebase

Ted Kremenek kremenek at apple.com
Mon Jan 31 18:03:16 PST 2011


I noticed that TOT Clang is now very noisy with the -Wnon-virtual-dtor warning when compiling itself.  For example:

/Volumes/Data/code/llvm/include/llvm/ADT/FoldingSet.h:379:25: warning: 'FoldingSet<T>' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor,2]
 template<class T> class FoldingSet : public FoldingSetImpl {
                         ^
/Volumes/Data/code/llvm/include/llvm/ADT/FoldingSet.h:450:7: warning: 'ContextualFoldingSet<T, Ctx>' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor,2]
 class ContextualFoldingSet : public FoldingSetImpl {
       ^

This warning is bogus since FoldingSetImpl (the parent class) has a virtual destructor.



More information about the cfe-dev mailing list