carlosgalvezp added inline comments.
================ Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-virtual-class-destructor.cpp:216-218 +template <typename T> +struct TemplatedDerived : PublicVirtualBaseStruct { +}; ---------------- aaron.ballman wrote: > I think there are more interesting template test cases that should be checked. > ``` > // What to do when the derived type is definitely polymorphic > // but the base class may or may not be? > template <typename Ty> > struct Derived : Ty { > virtual void func(); > }; > > struct S {}; > struct T { virtual ~T(); }; > > void instantiate() { > Derived<S> d1; // Diagnose > Derived<T> d2; // Don't diagnose > } > ``` > Very interesting example. The problem is that the diagnostic is shown where `Derived` is, not where the template is instantiated. How to go about that? Seems like more testing and better diagnostics are needed to lower the amount of false positives, I wonder if we should disable the test meanwhile? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110614/new/ https://reviews.llvm.org/D110614 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits