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
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()),
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
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:
> > >
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
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:
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
__
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
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
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
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
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
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
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
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
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.
29 matches
Mail list logo