[PATCH] D19539: Fix a crash in cppcoreguidelines-pro-type-member-init when checking a type with a template parameter as a base class.

2016-04-26 Thread Michael Miller via cfe-commits
michael_miller created this revision. michael_miller added reviewers: hokein, aaron.ballman, alexfh. michael_miller added a subscriber: cfe-commits. Fixed a crash in cppcoreguidelines-pro-type-member-init when encountering a type that uses one of its template parameters as a base when compiling f

Re: [PATCH] D19672: [clang-tidy] cppcoreguidelines-pro-type-member-init should not complain about static variables

2016-04-28 Thread Michael Miller via cfe-commits
michael_miller added inline comments. Comment at: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:284 @@ -283,2 +283,3 @@ varDecl(isDefinition(), HasDefaultConstructor, + hasAutomaticStorageDuration(), hasType(recordDecl(has(fieldDecl()),

[PATCH] D19802: Fix a crash in cppcoreguidelines-pro-type-member-init when checking a class that initializes itself as a base

2016-05-02 Thread Michael Miller via cfe-commits
michael_miller created this revision. michael_miller added reviewers: hokein, alexfh, aaron.ballman. michael_miller added a subscriber: cfe-commits. Fix a crash when a record type initializes itself in its own base class initializer list. http://reviews.llvm.org/D19802 Files: clang-tidy/cppco

Re: [PATCH] D19802: Fix a crash in cppcoreguidelines-pro-type-member-init when checking a class that initializes itself as a base

2016-05-02 Thread Michael Miller via cfe-commits
michael_miller added inline comments. Comment at: test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp:342 @@ +341,3 @@ + +template +class PositiveSelfInitialization : NegativeAggregateType aaron.ballman wrote: > hokein wrote: > > aaron.ballman wrote: > > >

Re: [PATCH] D19802: Fix a crash in cppcoreguidelines-pro-type-member-init when checking a class that initializes itself as a base

2016-05-02 Thread Michael Miller via cfe-commits
michael_miller marked 4 inline comments as done. Comment at: test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp:342 @@ +341,3 @@ + +// This pathological template fails to compile if actually instantiated. It +// results in the check seeing a null RecordDecl when examining

Re: [PATCH] D19802: Fix a crash in cppcoreguidelines-pro-type-member-init when checking a class that initializes itself as a base

2016-05-02 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 55904. michael_miller added a comment. Added a comment explaining the new test added. http://reviews.llvm.org/D19802 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp Index:

[PATCH] D19993: Fixed cppcoreguidelines-pro-type-member-init when checking records with indirect fields

2016-05-05 Thread Michael Miller via cfe-commits
michael_miller created this revision. michael_miller added reviewers: hokein, aaron.ballman, alexfh. michael_miller added a subscriber: cfe-commits. Fixed a crash in cppcoreguidelines-pro-type-member-init when checking record types with indirect fields pre-C++11. Fixed handling of indirect fields

Re: [PATCH] D19993: Fixed cppcoreguidelines-pro-type-member-init when checking records with indirect fields

2016-05-05 Thread Michael Miller via cfe-commits
michael_miller added inline comments. Comment at: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:31 @@ +30,3 @@ +// Convenience utility to get a RecordDecl from a QualType. +const RecordDecl *getCanonicalRecordDecl(const QualType &Type) { + if (const auto *RT = Type.getC

Re: [PATCH] D19993: Fixed cppcoreguidelines-pro-type-member-init when checking records with indirect fields

2016-05-06 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 56439. michael_miller added a comment. Switched to using getAsCXXRecordDecl. http://reviews.llvm.org/D19993 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp test/clang-tidy/cppcoreguidelines-pro-type-member-init-cxx98.cpp test/cla

[PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-03-30 Thread Michael Miller via cfe-commits
michael_miller created this revision. michael_miller added reviewers: flx, alexfh. michael_miller added a subscriber: cfe-commits. Added the remaining features needed to satisfy C++ Core Guideline Type.6: Always initialize a member variable to cppcoreguidelines-pro-type-member-init. The check no

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-03-30 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 52156. michael_miller added a comment. Added explanation of changes to ReleaseNotes.rst and cleaned up documentation for the check a little. http://reviews.llvm.org/D18584 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp clang-tidy

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-03-31 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 52238. michael_miller added a comment. Ran clang-format on all modified source files. http://reviews.llvm.org/D18584 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h docs/Relea

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-03-31 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 52272. michael_miller marked an inline comment as done. michael_miller added a comment. Fixed tests after clang-format. Fixed checks related to non-trivial compiler-generated default constructors that weren't accounted for in the previous iteration.

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-05 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 52752. michael_miller added a comment. Addressed comments. Moved isTriviallyDefaultConstructible into utils/TypeTraits. Moved AST matchers into utils/Matchers.h. Enclosed all source-local functions in an anonymous namespace and removed static. Replaced

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-07 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 52950. michael_miller marked 15 inline comments as done. michael_miller added a comment. Removed a superfluous cast and added periods to some comments. http://reviews.llvm.org/D18584 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-08 Thread Michael Miller via cfe-commits
michael_miller marked 4 inline comments as done. michael_miller added a comment. In http://reviews.llvm.org/D18584#395208, @alexfh wrote: > Looks good from my side. Please wait for the Aaron's approval. > > Thank you for working on this! No problem! Thanks for taking the time to review and give

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 53380. michael_miller marked 2 inline comments as done. michael_miller added a comment. Herald added a subscriber: klimek. Moved isDelegatingConstructor and isUserProvided into clang/include/clang/ASTMatchers/ASTMatchers.h and updated the tests and doc

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller marked 3 inline comments as done. michael_miller added a comment. Sounds good! Updated with suggested changes. http://reviews.llvm.org/D18584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 53441. michael_miller added a comment. Removed accidentally duplicated test case. http://reviews.llvm.org/D18584 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h clang-tidy/uti

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller added a comment. In http://reviews.llvm.org/D18584#398298, @aaron.ballman wrote: > LGTM with one minor correction (you can correct when committing it). Oops! Not sure how that happened. I submitted a revised diff. http://reviews.llvm.org/D18584 __

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller marked an inline comment as done. michael_miller added a comment. In http://reviews.llvm.org/D18584#398298, @aaron.ballman wrote: > LGTM with one minor correction (you can correct when committing it). Also, what's the next step? Is there anything else for me to do? http://revie

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller added a comment. In http://reviews.llvm.org/D18584#398929, @alexfh wrote: > Do you have svn commit access? I do not... this is my first contribution to llvm/clang. http://reviews.llvm.org/D18584 ___ cfe-commits mailing list cfe-com

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller added a comment. In http://reviews.llvm.org/D18584#399024, @alexfh wrote: > I can commit the patch for you, but you need to split it in two: one for the > cfe repository, one for clang-tools-extra. Great—thanks! I have them separated already and had to merge them for the Phabri

[PATCH] D19038: Add AST Matchers for CXXConstructorDecl::isDelegatingConstructor and CXXMethodDecl::isUserProvided.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller created this revision. michael_miller added reviewers: alexfh, aaron.ballman. michael_miller added a subscriber: cfe-commits. Herald added a subscriber: klimek. Added two AST matchers: isDelegatingConstructor for CXXConstructorDecl::IsDelegatingConstructor; and isUserProvided corre

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 53480. michael_miller added a comment. Broke out the cfe parts into its own change (http://reviews.llvm.org/D19038). http://reviews.llvm.org/D18584 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp clang-tidy/cppcoreguidelines/ProTyp

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-18 Thread Michael Miller via cfe-commits
michael_miller added a comment. In http://reviews.llvm.org/D18584#403872, @alexfh wrote: > FYI, the check has started crashing after this patch. I'll try to provide a > minimal test case soon. The relevant part of the stack trace is: > > @ 0x7fc9c255efa0 8 clang::Stmt::getLocStar

[PATCH] D19270: Fix a crash in cppcoreguidelines-pro-type-member-init related to missing constructor bodies.

2016-04-19 Thread Michael Miller via cfe-commits
michael_miller created this revision. michael_miller added reviewers: alexfh, aaron.ballman, hokein. michael_miller added a subscriber: cfe-commits. Fixes a crash in cppcoreguidelines-pro-type-member-init when checking some record types with a constructor without a body. We now check to make sure

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-19 Thread Michael Miller via cfe-commits
michael_miller added a comment. In http://reviews.llvm.org/D18584#404901, @hokein wrote: > In http://reviews.llvm.org/D18584#404192, @michael_miller wrote: > > > In http://reviews.llvm.org/D18584#403872, @alexfh wrote: > > > > > FYI, the check has started crashing after this patch. I'll try to pr

Re: [PATCH] D19270: Fix a crash in cppcoreguidelines-pro-type-member-init related to missing constructor bodies.

2016-04-19 Thread Michael Miller via cfe-commits
michael_miller added a comment. In http://reviews.llvm.org/D19270#405805, @alexfh wrote: > LG. Do you need me to submit the patch? Yeah, that's be awesome—thanks! http://reviews.llvm.org/D19270 ___ cfe-commits mailing list cfe-commits@lists.llvm.