[PATCH] D24965: [clang-tidy] Fix cppcoreguidelines-pro-type-member-init false negatives

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 4 06:34:09 PDT 2016


aaron.ballman added a comment.

Generally looks good to me, sorry I missed these tiny nits last time around.



> ProTypeMemberInitCheck.h:49
>    void checkMissingMemberInitializer(ASTContext &Context,
> +                                     const CXXRecordDecl *ClassDecl,
>                                       const CXXConstructorDecl *Ctor);

Since this is not allowed to be a null pointer, would it make more sense to use a reference instead (same below)?

> cppcoreguidelines-pro-type-member-init.cpp:409
> +
> +template struct NegativeTemplateVirtualDestructor<int>;
> +

Sorry, I missed one bit to my test (my fault), can you also add `int F;` to ensure that it still triggers the diagnostic?

https://reviews.llvm.org/D24965





More information about the cfe-commits mailing list