fwolff added inline comments.

================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-pro-type-member-init.cpp:374
 {
   PositiveSelfInitialization() : PositiveSelfInitialization() {}
 };
----------------
carlosgalvezp wrote:
> fwolff wrote:
> > carlosgalvezp wrote:
> > > Not really sure what this test is meant to do. Why would it call the 
> > > destructor of the own class in it's own constructor? Looks very strange 
> > > to me.
> > > 
> > > If anything, the constructor should call the constructor of the base:
> > > 
> > > PositiveSelfInitialization() : NegativeAggregateType()
> > > 
> > > What do you think?
> > The comment above talks about a "pathological template", so my guess is 
> > that this checks that clang-tidy doesn't crash for this input. The only 
> > reason why I had to touch this test at all is that the constructor is now 
> > treated as a delegating constructor, which suppresses the warning.
> Hmm, I see. I would like to make sure we still catch the failure mode "this 
> constructor does not initialize these base classes" for class templates.
> 
> I don't see such test existing (only for non-template classes), maybe you can 
> add that too?
Good point, done now.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113518/new/

https://reviews.llvm.org/D113518

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to