carlosgalvezp added a comment. Ahh, it seems that for templates, the class has this AST:
|-ClassTemplateDecl <line:6:1, line:10:1> line:7:8 Derived | |-TemplateTypeParmDecl <line:6:11, col:20> col:20 typename depth 0 index 0 T | |-CXXRecordDecl <line:7:1, line:10:1> line:7:8 struct Derived definition | `-ClassTemplateSpecializationDecl <line:6:1, line:10:1> line:7:8 struct Derived definition So the derived destructor only shows up in `ClassTemplateSpecializationDecl` - the `CXXRecordDecl` doesn't have it (therefore implicit public non-virtual) and that's why the check triggers. 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