Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-30 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. Sorry for long delay. I had some issues with git-svn on mac. Repository: rL LLVM https://reviews.llvm.org/D23343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-30 Thread Piotr Padlewski via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280180: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix (authored by Prazek). Changed prior to commit: https://reviews.llvm.org/D23343?vs=68824&id=69787#toc Repository: rL LLVM https://r

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-22 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG. Thank you! https://reviews.llvm.org/D23343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-21 Thread Piotr Padlewski via cfe-commits
Prazek updated this revision to Diff 68824. Prazek added a comment. - fixes https://reviews.llvm.org/D23343 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp docs/ReleaseNotes.rst test/clang-tidy/modernize-make-shared.cpp test/clang-tidy/modernize-make-unique.cpp Index: test/clang-tidy

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-19 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:35 @@ +34,3 @@ + auto CanCallCtor = unless(has(ignoringImpCasts(cxxConstructExpr( + hasDeclaration(decl(anyOf(isPrivate(), isProtected(; + alexfh wrote: > Prazek wro

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:35 @@ +34,3 @@ + auto CanCallCtor = unless(has(ignoringImpCasts(cxxConstructExpr( + hasDeclaration(decl(anyOf(isPrivate(), isProtected(; + Prazek wrote: > alexfh wro

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-17 Thread Piotr Padlewski via cfe-commits
Prazek marked 2 inline comments as done. Prazek added a comment. https://reviews.llvm.org/D23343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-17 Thread Piotr Padlewski via cfe-commits
Prazek marked 8 inline comments as done. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:35 @@ +34,3 @@ + auto CanCallCtor = unless(has(ignoringImpCasts(cxxConstructExpr( + hasDeclaration(decl(anyOf(isPrivate(), isProtected(; + alexfh wrote: >

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-17 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:32-33 @@ -31,1 +31,4 @@ + // Calling make_smart_ptr from within a member function of a type with a + // private or protected constructor would be ill-formed. + auto CanCallCtor = unless(has(i

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:32-33 @@ -31,1 +31,4 @@ + // Calling make_smart_ptr from within a member function of a type with a + // private or protected constructor would be ill-formed. + auto CanCallCtor = unless(has(i

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-17 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a subscriber: malcolm.parsons. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:32-33 @@ -31,1 +31,4 @@ + // Calling make_smart_ptr from within a member function of a type with a + // private or protected constructor would be ill-formed. + auto Can

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:35 @@ +34,3 @@ + auto CanCallCtor = unless(has(ignoringImpCasts(cxxConstructExpr( + hasDeclaration(decl(anyOf(isPrivate(), isProtected(; + Prazek wrote: > aaron.ball

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-16 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:35 @@ +34,3 @@ + auto CanCallCtor = unless(has(ignoringImpCasts(cxxConstructExpr( + hasDeclaration(decl(anyOf(isPrivate(), isProtected(; + aaron.ballman wrote: > Pra

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-16 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:35 @@ +34,3 @@ + auto CanCallCtor = unless(has(ignoringImpCasts(cxxConstructExpr( + hasDeclaration(decl(anyOf(isPrivate(), isProtected(; + Prazek wrote: > aar

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-16 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:35 @@ +34,3 @@ + auto CanCallCtor = unless(has(ignoringImpCasts(cxxConstructExpr( + hasDeclaration(decl(anyOf(isPrivate(), isProtected(; + aaron.ballman wrote: > Per

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-16 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM with one minor nit (you can fix it during the commit). Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:35 @@ +34,3 @@ + auto CanCallCtor = unless(ha

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-13 Thread Piotr Padlewski via cfe-commits
Prazek updated this revision to Diff 67967. Prazek added a comment. - fixes https://reviews.llvm.org/D23343 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp docs/ReleaseNotes.rst test/clang-tidy/modernize-make-shared.cpp test/clang-tidy/modernize-make-unique.cpp Index: test/clang-tidy

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-13 Thread Piotr Padlewski via cfe-commits
Prazek updated this revision to Diff 67966. Prazek marked 6 inline comments as done. Prazek added a comment. - fixes https://reviews.llvm.org/D23343 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp docs/ReleaseNotes.rst test/clang-tidy/modernize-make-shared.cpp test/clang-tidy/moderniz

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/modernize-make-shared.cpp:109 @@ +108,3 @@ + void create() { +auto ptr = std::shared_ptr(new Private(42)); + } Prazek wrote: > aaron.ballman wrote: > > Add comments explaining why make_shared i

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-10 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Comment at: docs/ReleaseNotes.rst:78 @@ -77,1 +77,3 @@ +- Bugfix for `modernize-make-unique + `_ I think will be better to have //Fixed

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-10 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: test/clang-tidy/modernize-make-shared.cpp:109 @@ +108,3 @@ + void create() { +auto ptr = std::shared_ptr(new Private(42)); + } aaron.ballman wrote: > Add comments explaining why make_shared is not correct. Also, plea

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. Good catch! Some small nits. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:32-33 @@ -31,1 +31,4 @@ + // It is possible to make smart ptr calling private ctor inside of a member + // function. Change to make_smart_ptr will be invalid. +

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-09 Thread Piotr Padlewski via cfe-commits
Prazek updated this revision to Diff 67460. Prazek added a comment. I hate it when arc do this thing. When origin/master is not the trunk... https://reviews.llvm.org/D23343 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp docs/ReleaseNotes.rst test/clang-tidy/modernize-make-shared.cpp

[PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-09 Thread Piotr Padlewski via cfe-commits
Prazek created this revision. Prazek added reviewers: alexfh, aaron.ballman, hokein. Prazek added a subscriber: cfe-commits. Bugfix for 27321. When the constructor of stored pointer type is private then it is invalid to change it to make_shared or make_unique. https://reviews.llvm.org/D23343 Fil