r336137 - [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-07-02 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Mon Jul 2 12:21:36 2018 New Revision: 336137 URL: http://llvm.org/viewvc/llvm-project?rev=336137&view=rev Log: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers Summary: Emmiting new intrinsic that strips invariant.groups to make devirtulization sound, as

r334600 - Add -fforce-emit-vtables

2018-06-13 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Wed Jun 13 06:55:42 2018 New Revision: 334600 URL: http://llvm.org/viewvc/llvm-project?rev=334600&view=rev Log: Add -fforce-emit-vtables Summary: In many cases we can't devirtualize because definition of vtable is not present. Most of the time it is caused by inline virtua

r331448 - Rename invariant.group.barrier to launder.invariant.group

2018-05-03 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Thu May 3 04:03:01 2018 New Revision: 331448 URL: http://llvm.org/viewvc/llvm-project?rev=331448&view=rev Log: Rename invariant.group.barrier to launder.invariant.group Summary: This is one of the initial commit of "RFC: Devirtualization v2" proposal: https://docs.google.com

r313278 - Enable __declspec(selectany) on any platform

2017-09-14 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Thu Sep 14 10:33:08 2017 New Revision: 313278 URL: http://llvm.org/viewvc/llvm-project?rev=313278&view=rev Log: Enable __declspec(selectany) on any platform Summary: This feature was disabled probably by mistake in rL300562 This fixes bug https://bugs.llvm.org/show_bug.cgi?id

r304455 - Fixed broken test (strict-vtable-pointers)

2017-06-01 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Thu Jun 1 14:08:05 2017 New Revision: 304455 URL: http://llvm.org/viewvc/llvm-project?rev=304455&view=rev Log: Fixed broken test (strict-vtable-pointers) Modified: cfe/trunk/test/CodeGenCXX/strict-vtable-pointers.cpp Modified: cfe/trunk/test/CodeGenCXX/strict-vtable-poi

r304448 - Emit invariant.group.barrier when using union field

2017-06-01 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Thu Jun 1 13:39:34 2017 New Revision: 304448 URL: http://llvm.org/viewvc/llvm-project?rev=304448&view=rev Log: Emit invariant.group.barrier when using union field Summary: We need to emit barrier if the union field is CXXRecordDecl because it might have vptrs. The testcode w

r304397 - Fixed warnings

2017-06-01 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Thu Jun 1 04:24:36 2017 New Revision: 304397 URL: http://llvm.org/viewvc/llvm-project?rev=304397&view=rev Log: Fixed warnings Modified: cfe/trunk/include/clang/AST/VTableBuilder.h cfe/trunk/lib/CodeGen/CodeGenModule.cpp Modified: cfe/trunk/include/clang/AST/VTableBu

r304394 - Emit available_externally vtables opportunistically

2017-06-01 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Thu Jun 1 03:04:05 2017 New Revision: 304394 URL: http://llvm.org/viewvc/llvm-project?rev=304394&view=rev Log: Emit available_externally vtables opportunistically Summary: We can emit vtable definition having inline function if they are all emitted. Reviewers: rjmccall, rsm

r303488 - [Devirtualization] insert placement new barrier with -O0

2017-05-20 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Sat May 20 03:56:18 2017 New Revision: 303488 URL: http://llvm.org/viewvc/llvm-project?rev=303488&view=rev Log: [Devirtualization] insert placement new barrier with -O0 Summary: To not break LTO with different optimizations levels, we should insert the barrier regardles of op

r301178 - [Devirtualization] Emit invariant.group loads with empty group md

2017-04-24 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Mon Apr 24 07:58:43 2017 New Revision: 301178 URL: http://llvm.org/viewvc/llvm-project?rev=301178&view=rev Log: [Devirtualization] Emit invariant.group loads with empty group md Summary: As discussed here http://lists.llvm.org/pipermail/llvm-dev/2017-January/109332.html havin

[clang-tools-extra] r296888 - [clang-tidy] Yet another docs fixes

2017-03-03 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Fri Mar 3 11:16:11 2017 New Revision: 296888 URL: http://llvm.org/viewvc/llvm-project?rev=296888&view=rev Log: [clang-tidy] Yet another docs fixes Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-emplace.rst Modified: clang-tools-extra/trunk/docs/

[clang-tools-extra] r296867 - [clang-tidy] Fix modernize-use-emplace docs

2017-03-03 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Fri Mar 3 06:42:22 2017 New Revision: 296867 URL: http://llvm.org/viewvc/llvm-project?rev=296867&view=rev Log: [clang-tidy] Fix modernize-use-emplace docs Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-emplace.rst Modified: clang-tools-extra/tru

r292112 - Add -fstrict-vtable-pointers to UsersManual

2017-01-16 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Mon Jan 16 07:20:08 2017 New Revision: 292112 URL: http://llvm.org/viewvc/llvm-project?rev=292112&view=rev Log: Add -fstrict-vtable-pointers to UsersManual Summary: Add missing flag to UsersManual It would be good to merge it to 4.0 branch. Reviewers: hans Subscribers: cfe-

r290677 - [ItaniumABI] NFC changes

2016-12-28 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Wed Dec 28 12:26:08 2016 New Revision: 290677 URL: http://llvm.org/viewvc/llvm-project?rev=290677&view=rev Log: [ItaniumABI] NFC changes Modified: cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp Modified: cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp URL: http://llvm.org/viewvc/llvm-

r290676 - Revert "Mention devirtualization in release notes"

2016-12-28 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Wed Dec 28 12:25:30 2016 New Revision: 290676 URL: http://llvm.org/viewvc/llvm-project?rev=290676&view=rev Log: Revert "Mention devirtualization in release notes" Accidental commit. LLVM changes have not been pushed yet This reverts commit 592453413690a2d16784667d1644758b9af7

r290675 - Mention devirtualization in release notes

2016-12-28 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Wed Dec 28 12:23:23 2016 New Revision: 290675 URL: http://llvm.org/viewvc/llvm-project?rev=290675&view=rev Log: Mention devirtualization in release notes Modified: cfe/trunk/docs/ReleaseNotes.rst Modified: cfe/trunk/docs/ReleaseNotes.rst URL: http://llvm.org/viewvc/llvm

r290424 - Use after move bug fixes

2016-12-23 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Fri Dec 23 05:40:44 2016 New Revision: 290424 URL: http://llvm.org/viewvc/llvm-project?rev=290424&view=rev Log: Use after move bug fixes Summary: Bunch of fixed bugs in Clang after running misc-use-after-move in clang-tidy. Reviewers: rsmith, mboehme Subscribers: cfe-commi

Re: [PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-19 Thread Piotr Padlewski via cfe-commits
Firstly, please respond in phabricator if it is possible. When you send email it doesn't appear in phabricator, it's probably a bug. 2016-12-19 8:00 GMT+01:00 Mads Ravn : > Hi Piotr, > > Thank you for your detailed comments :) > > I would love some help with the other fixit. I have some notes on

[clang-tools-extra] r289930 - [clang-tidy] fix missing anchor for MPI Module

2016-12-16 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Fri Dec 16 03:14:47 2016 New Revision: 289930 URL: http://llvm.org/viewvc/llvm-project?rev=289930&view=rev Log: [clang-tidy] fix missing anchor for MPI Module Summary: MPIModule was not linked to plugins Reviewers: alexfh, Alexander_Droste, hokein Subscribers: JDevlieghere,

Re: [PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-15 Thread Piotr Padlewski via cfe-commits
I think that the feature I mentioned is right thing to put in this check, however you don't have to implement it right now, just leave FIXIT comment 2016-12-15 20:55 GMT+01:00 Mads Ravn : > Hi Piotr, > > That is a good point. Because it is not always -1 or 1 that determines > lexicographical high

Re: [clang-tools-extra] r289656 - modernize-use-auto NFC fixes

2016-12-15 Thread Piotr Padlewski via cfe-commits
For most loop changes here applying modernize-loop-convert would be better > ;) > > On Wed, Dec 14, 2016 at 4:29 PM, Piotr Padlewski via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: prazek >> Date: Wed Dec 14 09:29:23 2016 >> New Revision

[clang-tools-extra] r289658 - Deleted unused typedef

2016-12-14 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Wed Dec 14 09:42:23 2016 New Revision: 289658 URL: http://llvm.org/viewvc/llvm-project?rev=289658&view=rev Log: Deleted unused typedef Modified: clang-tools-extra/trunk/modularize/ModularizeUtilities.cpp Modified: clang-tools-extra/trunk/modularize/ModularizeUtilities.cp

[clang-tools-extra] r289656 - modernize-use-auto NFC fixes

2016-12-14 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Wed Dec 14 09:29:23 2016 New Revision: 289656 URL: http://llvm.org/viewvc/llvm-project?rev=289656&view=rev Log: modernize-use-auto NFC fixes Modified: clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp clang-tools-extra/trunk/clang-apply-replacements/lib/To

Re: [clang-tools-extra] r286222 - [clang-tidy] clang-analyzer-alpha* checks are not registered, so there's no need to disable them

2016-11-11 Thread Piotr Padlewski via cfe-commits
Hmm, right now there is no way to use alpha checks in clang tidy? Piotr On Nov 10, 2016 10:57, "Malcolm Parsons via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > On 9 November 2016 at 18:50, Devin Coughlin wrote: > > > We agree that this is a valuable checker and are committed to getting i

[PATCH] D21298: [Clang-tidy] delete null check

2016-11-10 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: test/clang-tidy/misc-delete-null-pointer.cpp:11 + } + // CHECK-FIXES: delete p; + int *p3 = new int[3]; Is there check-fixes-not? This seems to be required here, because even if the fixit won't happen here, the test w

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-11-10 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. I think this change is not required at first place. It is introduced because of "modernize-use-delete" was too ambiguous because of operator delete, so it was changed to "modernize-use-equals-delete". But this case is not ambiguous at all, so I don't see point changing th

[PATCH] D26117: [Devirtualization] Decorate vfunction load with invariant.load

2016-10-29 Thread Piotr Padlewski via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285497: [Devirtualization] Decorate vfunction load with invariant.load (authored by Prazek). Changed prior to commit: https://reviews.llvm.org/D26117?vs=76303&id=76306#toc Repository: rL LLVM https:

r285497 - [Devirtualization] Decorate vfunction load with invariant.load

2016-10-29 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Sat Oct 29 10:28:30 2016 New Revision: 285497 URL: http://llvm.org/viewvc/llvm-project?rev=285497&view=rev Log: [Devirtualization] Decorate vfunction load with invariant.load Summary: This patch was introduced one year ago, but because my google account was disabled, I didn't

r285496 - NFC small format

2016-10-29 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Sat Oct 29 10:28:25 2016 New Revision: 285496 URL: http://llvm.org/viewvc/llvm-project?rev=285496&view=rev Log: NFC small format Modified: cfe/trunk/lib/Analysis/UninitializedValues.cpp Modified: cfe/trunk/lib/Analysis/UninitializedValues.cpp URL: http://llvm.org/viewvc

[PATCH] D26117: [Devirtualization] Decorate vfunction load with invariant.load

2016-10-29 Thread Piotr Padlewski via cfe-commits
Prazek updated this revision to Diff 76303. Prazek added a comment. Updated comment and reformatted https://reviews.llvm.org/D26117 Files: lib/CodeGen/ItaniumCXXABI.cpp test/CodeGenCXX/virtual-function-calls.cpp Index: test/CodeGenCXX/virtual-function-calls.cpp ===

[PATCH] D26117: [Devirtualization] Decorate vfunction load with invariant.load

2016-10-29 Thread Piotr Padlewski via cfe-commits
Prazek updated this revision to Diff 76302. Prazek added a comment. rebae https://reviews.llvm.org/D26117 Files: lib/CodeGen/ItaniumCXXABI.cpp test/CodeGenCXX/virtual-function-calls.cpp Index: test/CodeGenCXX/virtual-function-calls.cpp =

[PATCH] D26117: [Devirtualization] Decorate vfunction load with invariant.load

2016-10-29 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. merging with master. Gonna update patch in a minute. https://reviews.llvm.org/D26117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26117: [Devirtualization] Decorate vfunction load with invariant.load

2016-10-29 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. Here is commit from last year https://reviews.llvm.org/D13279 https://reviews.llvm.org/D26117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26117: [Devirtualization] Decorate vfunction load with invariant.load

2016-10-29 Thread Piotr Padlewski via cfe-commits
Prazek created this revision. Prazek added reviewers: rsmith, rengolin. Prazek added subscribers: cfe-commits, rjmccall, nlewycky. This patch was introduced one year ago, but because my google account was disabled, I didn't get email with failing buildbot and I missed revert of this commit. There

[PATCH] D25898: [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset()

2016-10-23 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: test/clang-tidy/modernize-make-shared.cpp:122 + Pderived = std::shared_ptr(new Derived()); + // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: use std::make_shared instead + // CHECK-FIXES: Pderived = std::make_shared(); ma

[PATCH] D21502: Fix heuristics skipping invalid ctor-initializers with C++11

2016-10-23 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. Richard? https://reviews.llvm.org/D21502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24894: [clang-tidy] Prefer transparent functors to non-transparent one.

2016-10-23 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-transparent-functors.rst:12 + .. code-block:: c++ + +// Non-transparent functor Say somewhere that you also handle cases like std::less(arg1, arg2) because from this documentati

[PATCH] D24894: [clang-tidy] Prefer transparent functors to non-transparent one.

2016-10-23 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/UseTransparentFunctorsCheck.cpp:70 +static const StringRef Message = +"prefer transparent functors (aka diamond operators)"; + The message would be much better if you would put the name of this fu

[PATCH] D25898: [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset()

2016-10-23 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. Besides this looks good Comment at: test/clang-tidy/modernize-make-shared.cpp:122 + Pderived = std::shared_ptr(new Derived()); + // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: use std::make_shared instead + // CHECK-FIXES: Pderived = std::make_shared();

[PATCH] D25316: [clang-tidy] Fix PR25499: Enhance modernize-use-auto to casts

2016-10-09 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. BTW I think changing the commit name by removing bug ID would be good, because it would be more clear that this is a feature commit, not a bug fix. You can move t he bug id, or the link to bug to the summary section. https://reviews.llvm.org/D25316 __

[PATCH] D25316: [clang-tidy] Fix PR25499: Enhance modernize-use-auto to casts

2016-10-09 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: test/clang-tidy/modernize-use-auto-cast-remove-stars.cpp:25 + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use auto when initializing with a cast to avoid duplicating the type name + // CHECK-FIXES: auto ll = static_cast(l); + unsigne

[PATCH] D25316: [clang-tidy] Fix PR25499: Enhance modernize-use-auto to casts

2016-10-09 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D25316#565574, @malcolm.parsons wrote: > In https://reviews.llvm.org/D25316#565567, @Prazek wrote: > > > functionDecl(hasName(LEXICAL_CAST_NAME), > > > I was trying to avoid specifying the name of the function so that it works > for any t

[PATCH] D25363: Store a SourceRange for multi-token builtin types

2016-10-09 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D25363#565472, @malcolm.parsons wrote: > I've tested this with clang-query using `match typeLoc()` and a lot of > permutations of int, short, long, unsigned and const. I am pretty sure it works, but someone could change the implementation and

[PATCH] D25363: Store a SourceRange for multi-token builtin types

2016-10-09 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D25363#565445, @malcolm.parsons wrote: > In https://reviews.llvm.org/D25363#565371, @Prazek wrote: > > > Thanks for the patch! I think some unit test should be added. > > > Are there any existing unit tests for TypeLoc that I can add to? > > > D

[PATCH] D25316: [clang-tidy] Fix PR25499: Enhance modernize-use-auto to casts

2016-10-09 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D25316#565463, @malcolm.parsons wrote: > In https://reviews.llvm.org/D25316#565378, @Prazek wrote: > > > Awesome to see this patch. After this one will make it to upstream, it will > > be much easier for me to do same with template functions. >

[PATCH] D25316: [clang-tidy] Fix PR25499: Enhance modernize-use-auto to casts

2016-10-08 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. Awesome to see this patch. After this one will make it to upstream, it will be much easier for me to do same with template functions. Comment at: test/clang-tidy/modernize-use-auto-cast-remove-stars.cpp:2 +// RUN: %check_clang_tidy %s modernize-use-auto

[PATCH] D25363: Store a SourceRange for multi-token builtin types

2016-10-08 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. Thanks for the patch! I think some unit test should be added. Do you also handle cases like unsigned long long unsigned volatile long const long static etc. The problem here is that the whole type like "unsigned long long" could be in other tokens. I talked with Ri

[PATCH] D25316: [clang-tidy] Fix PR25499: Enhance modernize-use-auto to casts

2016-10-07 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D25316#564217, @malcolm.parsons wrote: > In https://reviews.llvm.org/D25316#563930, @Prazek wrote: > > > Please add tests with > > > > long long p = static_cast(4); > > > > > > and the same with const at beginning. I remember I had problems

[PATCH] D25316: [clang-tidy] Fix PR25499: Enhance modernize-use-auto to casts

2016-10-06 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. Please add tests with long long p = static_cast(4); and the same with const at beginning. I remember I had problems with this last time (Type->SourceRange was returning only source range for the first token. I will review patch later. https://reviews.llvm.org/D25316

Re: [PATCH] D22057: Prevent devirtualization of calls to un-instantiated functions.

2016-09-10 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Comment at: lib/Sema/Sema.cpp:684 @@ +683,3 @@ + for (auto PII : Pending) +if (FunctionDecl *Func = dyn_cast(PII.first)) + Func->setMarkedForPendingInstantiation(); Dry. Use auto https://reviews.llvm.org/

Re: [PATCH] D24439: [Clang] Fix some Clang-tidy modernize-use-bool-literals and Include What You Use warnings; other minor fixes

2016-09-10 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek accepted this revision. Prazek added a reviewer: Prazek. Prazek added a comment. This revision is now accepted and ready to land. Lgtm Repository: rL LLVM https://reviews.llvm.org/D24439 ___ cfe-commits m

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/readability/ContainerSizeEmptyCheck.cpp:34 @@ +33,3 @@ + has(functionDecl( + isPublic(), hasName("size"), returns(isInteger()), + unless(anyOf(returns(isAnyCharacter()), returns(booleanType()), ---

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:34 @@ +33,3 @@ + const auto *Construct = Result.Nodes.getNodeAs("construct"); + const auto arguments = Construct->arguments(); + Arguments (upper case) Repository:

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-09-01 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:191 @@ +190,3 @@ + +if (const Stmt *S = Node.get()) { + Result.push_back(S); Dry: const auto * https://reviews.llvm.org/D23353 __

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

[clang-tools-extra] r280180 - [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-30 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Tue Aug 30 19:06:55 2016 New Revision: 280180 URL: http://llvm.org/viewvc/llvm-project?rev=280180&view=rev Log: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix Summary: Bugfix for 27321. When the constructor of stored pointer type is private then it is invalid to

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] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-17 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D23353#516314, @mboehme wrote: > In https://reviews.llvm.org/D23353#511362, @Prazek wrote: > > > I will review it later, but my first thoughts: > > > > 1. I think we should make some other group, because misc seems to be > > overloaded. I discu

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-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 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] D22346: [Clang-tidy] CERT-MSC50-CPP (std:rand() )

2016-08-14 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/cert/LimitedRandomnessCheck.cpp:22-23 @@ +21,4 @@ + Finder->addMatcher( + declRefExpr(hasDeclaration(functionDecl(namedDecl(hasName("::rand")), + parameterCountIs(0 +

Re: [PATCH] D22346: [Clang-tidy] CERT-MSC50-CPP (std:rand() )

2016-08-14 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/cert/LimitedRandomnessCheck.cpp:22-23 @@ +21,4 @@ + Finder->addMatcher( + declRefExpr(hasDeclaration(functionDecl(namedDecl(hasName("::rand")), + parameterCountIs(0 +

Re: [PATCH] D22346: [Clang-tidy] CERT-MSC50-CPP (std:rand() )

2016-08-14 Thread Piotr Padlewski via cfe-commits
Prazek accepted this revision. Prazek added a comment. This revision is now accepted and ready to land. LGTM with the fixes of docs. Comment at: clang-tidy/cert/LimitedRandomnessCheck.cpp:31 @@ +30,3 @@ + Result.Nodes.getNodeAs("randomGenerator"); + diag(MatchedDecl->getLo

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] D15332: new clang-tidy checker readability-non-const-parameter

2016-08-12 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:95-98 @@ +94,6 @@ +const QualType T = VD->getType(); +if (T->isPointerType() && !T->getPointeeType().isConstQualified()) + markCanNotBeConst(VD->getInit(), true); +els

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] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-10 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek added a reviewer: Prazek. Prazek added a comment. I will review it later, but my first thoughts: 1. I think we should make some other group, because misc seems to be overloaded. I discussed it with Alex months ago - something like bugprone would be good

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

Re: [PATCH] D22725: [clang-tidy] Add check 'modernize-use-algorithm'

2016-08-09 Thread Piotr Padlewski via cfe-commits
2016-08-09 5:49 GMT-07:00 Aaron Ballman : > > I think this boils down to personal preference, which is why I'm > concerned about the check. Either mechanism is correct, so this is > purely a stylistic check in many regards. > > About warnings - well, if someone choose this check to be run, then he

Re: [PATCH] D23257: Fix clang-tidy crash when a single fix is applied on multiple files.

2016-08-08 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek added a comment. I remember that it was pissing me off when I used clang-tidy first time. Thanks for fixing that! https://reviews.llvm.org/D23257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

Re: [PATCH] D22725: [clang-tidy] Add check 'modernize-use-algorithm'

2016-08-08 Thread Piotr Padlewski via cfe-commits
2016-08-08 8:33 GMT-07:00 Aaron Ballman : > aaron.ballman added inline comments. > > > Comment at: clang-tidy/modernize/UseAlgorithmCheck.cpp:59-61 > @@ +58,5 @@ > + IncludeStyle(utils::IncludeSorter::parseIncludeStyle( > + Options.get("IncludeStyle", "llvm"))) { > +

Re: r277923 - [ASTReader] Use real move semantics instead of emulating them in the copy ctor.

2016-08-07 Thread Piotr Padlewski via cfe-commits
2016-08-06 5:45 GMT-07:00 Benjamin Kramer via cfe-commits < cfe-commits@lists.llvm.org>: > Author: d0k > Date: Sat Aug 6 07:45:16 2016 > New Revision: 277923 > > URL: http://llvm.org/viewvc/llvm-project?rev=277923&view=rev > Log: > [ASTReader] Use real move semantics instead of emulating them in

Re: [PATCH] D23243: [clang-tidy] enhance modernize-use-bool-literals to check ternary operator

2016-08-07 Thread Piotr Padlewski via cfe-commits
2016-08-07 15:38 GMT-07:00 Aaron Ballman : On Sun, Aug 7, 2016 at 6:33 PM, Piotr Padlewski > wrote: > > Prazek added a comment. > > > > Yea, I also have never heard of it. I don't think it is worth even > discussing > Just because you've never heard of a compiler extension that gets > pointed out

Re: [PATCH] D23243: [clang-tidy] enhance modernize-use-bool-literals to check ternary operator

2016-08-07 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. Yea, I also have never heard of it. I don't think it is worth even discussing https://reviews.llvm.org/D23243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23243: [clang-tidy] enhance modernize-use-bool-literals to check ternary operator

2016-08-07 Thread Piotr Padlewski via cfe-commits
Prazek accepted this revision. Prazek added a reviewer: Prazek. Prazek added a comment. This revision is now accepted and ready to land. LGTM, but wait a day, maybe someone will have other comments. https://reviews.llvm.org/D23243 ___ cfe-commits ma

Re: [PATCH] D23243: [clang-tidy] enhance modernize-use-bool-literals to check ternary operator

2016-08-06 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/UseBoolLiteralsCheck.cpp:38-43 @@ +37,8 @@ + unless(isInTemplateInstantiation(, + anyOf(hasTrueExpression(ignoringParenImpCasts( +integerLiteral().bind("trueBranchLiteral")

Re: [PATCH] D23130: [Clang-tidy] Add a check for definitions in the global namespace.

2016-08-03 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/misc/GlobalNamespaceCheck.cpp:46 @@ +45,3 @@ +// extern "C" globals need to be in the global namespace. +if (VDecl->isExternC()) + return; I think it would be better to check it in matcher. I see th

Re: [PATCH] D23135: [clang-tidy] misc-argument-comment non-strict mode

2016-08-03 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek added a comment. LG(TM) https://reviews.llvm.org/D23135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22725: [clang-tidy] Add check 'modernize-use-algorithm'

2016-08-03 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D22725#505020, @JDevlieghere wrote: > Addresses comments from Aaron Ballman > > @aaron.ballman Thanks for the thorough review! Can you check whether the > tests I added address your concerns? Could you also elaborate on the case > with the C-f

Re: [PATCH] D20196: [clang-tidy] Inefficient string operation

2016-08-02 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D20196#504397, @bittnerbarni wrote: > I'm planning to submit more patches in the future, as I have time for them. > So it wouldn't be in vain :) http://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access https://reviews.llvm.org/D201

Re: [PATCH] D20196: [clang-tidy] Inefficient string operation

2016-08-02 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek added a comment. In https://reviews.llvm.org/D20196#504394, @bittnerbarni wrote: > Thank you for all the assistance. Could you please do that? btw obtaining commit access and commiting is very simple, so if you are planning to send us some more cool pa

Re: [PATCH] D23008: [clang-tidy] fix segfault in cppcore-guidelines-special-member-functions check

2016-08-02 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek accepted this revision. Prazek added a reviewer: Prazek. Prazek added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D23008 ___ cfe-commits mailing list cfe-commits

Re: [PATCH] D22208: [clang-tidy] Fixes to modernize-use-emplace

2016-08-02 Thread Piotr Padlewski via cfe-commits
Prazek marked 5 inline comments as done. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:115 @@ -95,1 +114,3 @@ + auto CtorCallSourceRange = CharSourceRange::getTokenRange( + InnerCtorCall->getExprLoc(), CallParensRange.getBegin()); alexfh wrote: > Pr

Re: [PATCH] D22208: [clang-tidy] Fixes to modernize-use-emplace

2016-08-02 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D22208#503194, @alexfh wrote: > Please add revision number (this can be automated, if include differential > revision URL in your commit message as described in > http://llvm.org/docs/Phabricator.html#committing-a-change). I normally use arc

Re: [PATCH] D22208: [clang-tidy] Fixes to modernize-use-emplace

2016-08-01 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:115 @@ -95,1 +114,3 @@ + auto CtorCallSourceRange = CharSourceRange::getTokenRange( + InnerCtorCall->getExprLoc(), CallParensRange.getBegin()); alexfh wrote: > Prazek wrote:

Re: [PATCH] D22208: [clang-tidy] Fixes to modernize-use-emplace

2016-08-01 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/UseEmplaceCheck.h:36-37 @@ -32,1 +35,4 @@ +private: + std::vector ContainersWithPushBack; + std::vector SmartPointers; }; aaron.ballman wrote: > What about `llvm::make_range()`? llvm::make_range do

Re: [PATCH] D22725: [clang-tidy] Add check 'modernize-use-algorithm'

2016-08-01 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D22725#502374, @JDevlieghere wrote: > Addressed comments from Piotr Padlewski > > LLVM compiles with the latest version of this check, however some tests are > failing. I'll investigate the cause of this and update this check if it can > be pr

Re: [PATCH] D22725: [clang-tidy] Add check 'modernize-use-algorithm'

2016-07-31 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. I see you solved the void and conmpatible types problems. Excellent! Can you post a patch with changes after running LLVM? I would wait for Alex or Aaron to accept it. Comment at: clang-tidy/modernize/UseAlgorithmCheck.cpp:58-60 @@ +57,5 @@ + + for (co

[clang-tools-extra] r277097 - [clang-tidy] Fixes to modernize-use-emplace

2016-07-28 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Thu Jul 28 21:10:23 2016 New Revision: 277097 URL: http://llvm.org/viewvc/llvm-project?rev=277097&view=rev Log: [clang-tidy] Fixes to modernize-use-emplace Not everything is valid, but it should works for 99.8% cases https://reviews.llvm.org/D22208 Modified: clang-tools

Re: [llvm-dev] [PATCH] Add support for the 'unless' matcher in the dynamic layer.

2016-07-27 Thread Piotr Padlewski via cfe-commits
Is, but it is still a lot of typing and we are talking about debuging. 2016-07-27 3:40 GMT-07:00 Manuel Klimek : > On Wed, Jul 27, 2016 at 1:06 AM Piotr Padlewski via llvm-dev < > llvm-...@lists.llvm.org> wrote: > >> We could also just add nothing() matcher, so debugging would be much >> easier,

Re: [llvm-dev] [PATCH] Add support for the 'unless' matcher in the dynamic layer.

2016-07-26 Thread Piotr Padlewski via cfe-commits
We could also just add nothing() matcher, so debugging would be much easier, just add anything() or nothing() matcher as extra argument. The other pros of it is that new developers won't send the patches that uses those variadic matchers with only one argument. 2016-07-26 16:02 GMT-07:00 Zac Hans

Re: [PATCH] D22208: [clang-tidy] Fixes to modernize-use-emplace

2016-07-26 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:115 @@ -95,1 +114,3 @@ + auto CtorCallSourceRange = CharSourceRange::getTokenRange( + InnerCtorCall->getExprLoc(), CallParensRange.getBegin()); alexfh wrote: > This doesn't

Re: [PATCH] D22725: [clang-tidy] Add check 'misc-replace-memcpy'

2016-07-25 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D22725#495329, @etienneb wrote: > In https://reviews.llvm.org/D22725#494167, @Prazek wrote: > > > hmm It seems that I mislead you, I suck at C api - memmove source and > > destination can overlap, but std::move can't. So I guess you have to rem

  1   2   3   4   >