michael_miller added inline comments. ================ Comment at: test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp:342 @@ +341,3 @@ + +template <typename T> +class PositiveSelfInitialization : NegativeAggregateType ---------------- aaron.ballman wrote: > hokein wrote: > > aaron.ballman wrote: > > > Is it required to be a templated class to trigger the crash? > > Yes, it's required. > Then some comments in this test would be good, I would assume otherwise from > just looking at the test. It's a little bit of a pathological example. Without the template, the code won't compile at all due to an error. The check doesn't crash in that case (error: constructor for 'PositiveSelfInitialization' creates a delegation cycle [clang-diagnostic-delegating-ctor-cycles]). With the template in the mix, apparently PositiveSelfInitialization doesn't have a valid RecordDecl. If you instantiate the template, though, the code again fails to compile.
http://reviews.llvm.org/D19802 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits