[clang-tools-extra] r247007 - Add a redirection page to unbreak external links.

2015-09-08 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Sep 8 07:26:32 2015 New Revision: 247007 URL: http://llvm.org/viewvc/llvm-project?rev=247007&view=rev Log: Add a redirection page to unbreak external links. Apparently, there are some links to http://clang.llvm.org/extra/clang-tidy.html in the wild. It's better to keep t

[clang-tools-extra] r247153 - [clang-tidy] Automatically redirect to the new page.

2015-09-09 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Sep 9 10:23:39 2015 New Revision: 247153 URL: http://llvm.org/viewvc/llvm-project?rev=247153&view=rev Log: [clang-tidy] Automatically redirect to the new page. Modified: clang-tools-extra/trunk/docs/clang-tidy.rst Modified: clang-tools-extra/trunk/docs/clang-tidy.rs

[PATCH] D12732: Add a deprecation notice to the clang-modernize documentation.

2015-09-09 Thread Alexander Kornienko via cfe-commits
alexfh created this revision. alexfh added reviewers: klimek, revane. alexfh added a subscriber: cfe-commits. Add a deprecation notice to the clang-modernize documentation. Remove the reference to the external JIRA tracker. http://reviews.llvm.org/D12732 Files: docs/clang-modernize.rst Index:

Re: [PATCH] D12462: [PATCH] [clang-tidy] Add inconsistent declaration parameter name check

2015-09-09 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for the fixes. I really like this way of structuring the warnings more. We might need to polish the text in the messages a bit, and maybe also change the case without definitions, but overall this seems fine. I have a few more comments. Comme

[clang-tools-extra] r247163 - [clang-tidy] Fix PR22785.

2015-09-09 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Sep 9 12:06:09 2015 New Revision: 247163 URL: http://llvm.org/viewvc/llvm-project?rev=247163&view=rev Log: [clang-tidy] Fix PR22785. Fix http://llvm.org/PR22785. Bug 22785 - readability-braces-around-statements doesn't work well with macros. http://reviews.llvm.org/D127

Re: [PATCH] D12700: [clang-tidy] install helper scripts in CMake build

2015-09-09 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Not sure whether the scripts should go to share/clang or some other place. Sylvestre should know what's the common practice. Also, configure builds are still used for building packages, AFAIU, so they have to be modified as well (preferably, in the same patch). http://

Re: [PATCH] D12462: [PATCH] [clang-tidy] Add inconsistent declaration parameter name check

2015-09-09 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good now. Thank you for the hard work! I'll commit the patch for you. http://reviews.llvm.org/D12462 ___ cfe-commits mailing list cfe-comm

[clang-tools-extra] r247258 - Add a deprecation notice to the clang-modernize documentation.

2015-09-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Sep 10 04:42:01 2015 New Revision: 247258 URL: http://llvm.org/viewvc/llvm-project?rev=247258&view=rev Log: Add a deprecation notice to the clang-modernize documentation. Summary: Add a deprecation notice to the clang-modernize documentation. Remove the reference to the e

[clang-tools-extra] r247261 - [clang-tidy] Add inconsistent declaration parameter name check

2015-09-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Sep 10 05:07:11 2015 New Revision: 247261 URL: http://llvm.org/viewvc/llvm-project?rev=247261&view=rev Log: [clang-tidy] Add inconsistent declaration parameter name check This is first of series of patches, porting code from my project colobot-lint, as I mentioned recentl

Re: [PATCH] D12462: [PATCH] [clang-tidy] Add inconsistent declaration parameter name check

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh closed this revision. alexfh added a comment. Committed revision 247261. Thank you again for the new awesome check! http://reviews.llvm.org/D12462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[clang-tools-extra] r247266 - [clang-tidy] Renamed tests files to be closer to the check names.

2015-09-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Sep 10 05:58:38 2015 New Revision: 247266 URL: http://llvm.org/viewvc/llvm-project?rev=247266&view=rev Log: [clang-tidy] Renamed tests files to be closer to the check names. Added: clang-tools-extra/trunk/test/clang-tidy/google-build-explicit-make-pair.cpp - co

[clang-tools-extra] r247282 - [clang-tidy] add_new_check.py improvements: add doc file, refer it from .h

2015-09-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Sep 10 08:56:39 2015 New Revision: 247282 URL: http://llvm.org/viewvc/llvm-project?rev=247282&view=rev Log: [clang-tidy] add_new_check.py improvements: add doc file, refer it from .h + some console logging and minor cleanups. Modified: clang-tools-extra/trunk/clang-t

[PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh created this revision. alexfh added a reviewer: djasper. alexfh added a subscriber: cfe-commits. sizeof(some_std_string) is likely to be an error. This check finds this pattern and suggests using .size() instead. http://reviews.llvm.org/D12759 Files: clang-tidy/misc/CMakeLists.txt cla

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh updated this revision to Diff 34441. alexfh added a comment. Ignore template instantiations. http://reviews.llvm.org/D12759 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SizeofContainerCheck.cpp clang-tidy/misc/SizeofContainerCheck.h d

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh updated this revision to Diff 34446. alexfh added a comment. Match a broader set of containers. Updated diagnostic message. Added tests. http://reviews.llvm.org/D12759 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SizeofContainerCheck.cpp

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh marked 3 inline comments as done. Comment at: clang-tidy/misc/SizeofContainerCheck.cpp:37 @@ +36,3 @@ + expr(unless(isInTemplateInstantiation()), + sizeOfExpr( + has(expr(hasType(hasCanonicalType(hasDeclaration(recordDecl( Yes,

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh updated this revision to Diff 34451. alexfh marked 3 inline comments as done. alexfh added a comment. Don't complain on the ARRAYSIZE() pattern (where sizeof(container) is used as a denominator). http://reviews.llvm.org/D12759 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/Mis

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh marked 5 inline comments as done. Comment at: clang-tidy/misc/SizeofContainerCheck.cpp:23 @@ +22,3 @@ + E = E->IgnoreImpCasts(); + if (isa(E) || isa(E)) +return true; I don't think we need to remove anything beyond the most external pair of parenthes

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
On Thu, Sep 10, 2015 at 5:22 PM, Aaron Ballman wrote: > > > > Comment at: clang-tidy/misc/SizeofContainerCheck.cpp:49 > > @@ +48,3 @@ > > + SourceLocation SizeOfLoc = SizeOf->getLocStart(); > > + auto Diag = diag(SizeOfLoc, "sizeof() doesn't return the size of the " > > +

[clang-tools-extra] r247297 - [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stl

2015-09-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Sep 10 11:37:46 2015 New Revision: 247297 URL: http://llvm.org/viewvc/llvm-project?rev=247297&view=rev Log: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stl containers. Summary: sizeof(some_std_string) is likely to be an error. This check finds th

Re: [clang-tools-extra] r247393 - clang-tidy/readability-inconsistent-declaration-parameter-name.cpp: Appease MS-incompatibility [-fno-delayed-template-parsing]

2015-09-11 Thread Alexander Kornienko via cfe-commits
Thank you for the fix and sorry for breaking this again. I wonder what's the reason windows-targeting enables -fdelayed-template-parsing? Would it be the right thing to always turn this off in clang-tidy? On Fri, Sep 11, 2015 at 10:16 AM, NAKAMURA Takumi via cfe-commits < cfe-commits@lists.llvm.or

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-11 Thread Alexander Kornienko via cfe-commits
Indeed. But this has been fixed before I could get to it. On Thu, Sep 10, 2015 at 10:47 PM, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > aaron.ballman added a comment. > > This appears to have broken one of the bots: > > http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/

[clang-tools-extra] r247485 - [clang-tidy] Fix minor issues in the testing script.

2015-09-11 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Sep 11 17:38:26 2015 New Revision: 247485 URL: http://llvm.org/viewvc/llvm-project?rev=247485&view=rev Log: [clang-tidy] Fix minor issues in the testing script. Modified: clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py Modified: clang-tools-extra/trunk/te

[clang-tools-extra] r247489 - [clang-tidy] misc-sizeof-container: whitelist std::bitset<>.

2015-09-11 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Sep 11 17:54:44 2015 New Revision: 247489 URL: http://llvm.org/viewvc/llvm-project?rev=247489&view=rev Log: [clang-tidy] misc-sizeof-container: whitelist std::bitset<>. It's fine to use sizeof on std::bitset<>, since it doesn't have any external storage, everything's insi

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-13 Thread Alexander Kornienko via cfe-commits
and it seems > valid, so it'd be nice if this checker could be silenced on a > case-by-case basis. > > Thanks, > - Kim > > On Sat, Sep 12, 2015 at 12:09 AM, Alexander Kornienko via cfe-commits > wrote: > > Indeed. But this has been fixed before I could ge

[clang-tools-extra] r247559 - [clang-tidy] misc-sizeof-container: whitelist std::array

2015-09-14 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Sep 14 08:55:29 2015 New Revision: 247559 URL: http://llvm.org/viewvc/llvm-project?rev=247559&view=rev Log: [clang-tidy] misc-sizeof-container: whitelist std::array Modified: clang-tools-extra/trunk/clang-tidy/misc/SizeofContainerCheck.cpp clang-tools-extra/trunk/

[clang-tools-extra] r247578 - [clang-tidy] misc-sizeof-container: remove fix-it hints

2015-09-14 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Sep 14 11:51:52 2015 New Revision: 247578 URL: http://llvm.org/viewvc/llvm-project?rev=247578&view=rev Log: [clang-tidy] misc-sizeof-container: remove fix-it hints This turned out to be a rather noisy check, so automated fixes will only do harm. Remove them completely. M

[clang-tools-extra] r247580 - [clang-tidy] updated misc-sizeof-container docs.

2015-09-14 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Sep 14 11:56:57 2015 New Revision: 247580 URL: http://llvm.org/viewvc/llvm-project?rev=247580&view=rev Log: [clang-tidy] updated misc-sizeof-container docs. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-sizeof-container.rst Modified: clang-tools-extr

[clang-tools-extra] r247682 - [clang-tidy] Update check name in the comment. NFC.

2015-09-15 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Sep 15 08:13:48 2015 New Revision: 247682 URL: http://llvm.org/viewvc/llvm-project?rev=247682&view=rev Log: [clang-tidy] Update check name in the comment. NFC. Modified: clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py Modified: clang-tools-extra/trunk/clan

Re: [clang-tools-extra] r247393 - clang-tidy/readability-inconsistent-declaration-parameter-name.cpp: Appease MS-incompatibility [-fno-delayed-template-parsing]

2015-09-15 Thread Alexander Kornienko via cfe-commits
On Fri, Sep 11, 2015 at 3:30 PM, Aaron Ballman wrote: > On Fri, Sep 11, 2015 at 9:27 AM, Alexander Kornienko via cfe-commits > wrote: > > Thank you for the fix and sorry for breaking this again. I wonder what's > the > > reason windows-targeting enables -fdelayed-tem

Re: [PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.

2015-09-15 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Oops, forgot to hit "Submit" yesterday. Sorry for the delay. Comment at: clang-tidy/misc/MoveConstructorInitCheck.cpp:28 @@ +27,3 @@ + +AST_MATCHER(QualType, isExpensiveToCopy) { + // We can't reason about dependent types. Ignore them. T

Re: [PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.

2015-09-16 Thread Alexander Kornienko via cfe-commits
I also think this suits better for a clang-tidy check, but for a different reason: adding `std::move` calls can require adding `#include `, which is fine for a clang-tidy check (and we have facilities for that), but it's a questionable functionality for a compiler diagnostic. On 16 Sep 2015 09:20,

Re: [PATCH] D12700: [clang-tidy] install helper scripts in CMake build

2015-09-16 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D12700#246948, @sylvestre.ledru wrote: > share/clang is fine, thanks. Then we need to make a similar change to the configure build. Eugene, can you do this? http://reviews.llvm.org/D12700 ___ cf

[clang-tools-extra] r247792 - [clang-tidy] Improve the help text for -dump-config.

2015-09-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Sep 16 08:21:57 2015 New Revision: 247792 URL: http://llvm.org/viewvc/llvm-project?rev=247792&view=rev Log: [clang-tidy] Improve the help text for -dump-config. Modified: clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp Modified: clang-tools-extra/trunk/clan

[clang-tools-extra] r247798 - [clang-tidy] Added a style guide link.

2015-09-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Sep 16 08:54:16 2015 New Revision: 247798 URL: http://llvm.org/viewvc/llvm-project?rev=247798&view=rev Log: [clang-tidy] Added a style guide link. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-int.rst Modified: clang-tools-extra/trunk/docs/c

[clang-tools-extra] r247803 - [clang-tidy] Make google-runtime-int configurable.

2015-09-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Sep 16 09:36:22 2015 New Revision: 247803 URL: http://llvm.org/viewvc/llvm-project?rev=247803&view=rev Log: [clang-tidy] Make google-runtime-int configurable. Added: clang-tools-extra/trunk/test/clang-tidy/google-runtime-int-std.cpp Modified: clang-tools-extra/tru

[clang-tools-extra] r247806 - [clang-tidy] google-runtime-int: made the matcher more restricting, added a test for a false positive

2015-09-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Sep 16 10:08:46 2015 New Revision: 247806 URL: http://llvm.org/viewvc/llvm-project?rev=247806&view=rev Log: [clang-tidy] google-runtime-int: made the matcher more restricting, added a test for a false positive This should be NFC. Modified: clang-tools-extra/trunk/cl

Re: [PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.

2015-09-16 Thread Alexander Kornienko via cfe-commits
On Wed, Sep 16, 2015 at 5:15 PM, Aaron Ballman wrote: > Okay, I'm sold on this being a clang-tidy check instead, thank you > both for weighing in! > > I would love to see a check that covers more than just constructor > initialization contexts, which suggests a separate checker from > misc-move-c

[clang-tools-extra] r247812 - [clang-tidy] Ignore spaces in -checks=

2015-09-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Sep 16 11:16:53 2015 New Revision: 247812 URL: http://llvm.org/viewvc/llvm-project?rev=247812&view=rev Log: [clang-tidy] Ignore spaces in -checks= Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp Modified: clang-tools-extra/trunk/clang-tid

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-16 Thread Alexander Kornienko via cfe-commits
x27;d be nice if this checker could be silenced on a >> case-by-case basis. >> >> Thanks, >> - Kim >> >> On Sat, Sep 12, 2015 at 12:09 AM, Alexander Kornienko via cfe-commits >> wrote: >> > Indeed. But this has been fixed before I could get to i

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-16 Thread Alexander Kornienko via cfe-commits
>>> > >>> I think I've stumbled over code in our code base that uses > >>> sizeof(container) to report memory usage statistics and it seems > >>> valid, so it'd be nice if this checker could be silenced on a > >>> case-by-case bas

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-16 Thread Alexander Kornienko via cfe-commits
räsman" wrote: > >> >>> > >> >>> Late to the party, but I wanted to ask: is there a way to indicate > to > >> >>> the checker that we really *did* mean sizeof()? > >> >>> > >>

Re: [PATCH] D12933: Add a test to modernize-loop-convert.

2015-09-17 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with a comment. Comment at: test/clang-tidy/modernize-loop-convert-extra.cpp:705 @@ -704,16 +704,3 @@ - // FIXME: Right now, clang-tidy does not allow to make insertions

[clang-tools-extra] r247890 - [clang-tidy] install helper scripts

2015-09-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Sep 17 09:37:26 2015 New Revision: 247890 URL: http://llvm.org/viewvc/llvm-project?rev=247890&view=rev Log: [clang-tidy] install helper scripts Scripts are installed in same location as clang-fromat ones, so I think will be good idea to not create dedicated directory. I

Re: [PATCH] D12700: [clang-tidy] install helper scripts in CMake build

2015-09-17 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. LG. Thanks! Repository: rL LLVM http://reviews.llvm.org/D12700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12700: [clang-tidy] install helper scripts in CMake build

2015-09-17 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL247890: [clang-tidy] install helper scripts (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D12700?vs=34953&id=34997#toc Repository: rL LLVM http://reviews.llvm.org/D12700 Fi

Re: [PATCH] D12967: fix comments

2015-09-19 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thanks for the patch! Do you need me to commit this? http://reviews.llvm.org/D12967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D12961: Update clang-tidy documentation.

2015-09-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for converting the docs! Some of the usages of "transform" and "transformation" in these docs refer to "clang-modernize transform", and, thus, should be replaced with "check" or "clang-tidy check". I tried to find all such places. See comments. ==

r248090 - [clang-tidy] Fix example comments.

2015-09-19 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Sat Sep 19 08:01:57 2015 New Revision: 248090 URL: http://llvm.org/viewvc/llvm-project?rev=248090&view=rev Log: [clang-tidy] Fix example comments. Patch by don hinton! Differential revision: http://reviews.llvm.org/D12967 Modified: cfe/trunk/include/clang/Tooling/Commo

Re: [PATCH] D12967: fix comments

2015-09-19 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL248090: [clang-tidy] Fix example comments. (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D12967?vs=35091&id=35164#toc Repository: rL LLVM http://reviews.llvm.org/D12967 Fil

Re: [PATCH] D13006: Replace references to "transform" with references to "check" where neccessary in the documentation.

2015-09-21 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Thanks! LG with a couple of nits. Comment at: docs/clang-tidy/checks/modernize-pass-by-value.rst:6 @@ -5,2 +5,3 @@ move constructors added for many types it is now interestin

[clang-tools-extra] r248151 - [clang-tidy] Fixed formatting of headings in the docs.

2015-09-21 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Sep 21 07:13:27 2015 New Revision: 248151 URL: http://llvm.org/viewvc/llvm-project?rev=248151&view=rev Log: [clang-tidy] Fixed formatting of headings in the docs. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-loop-convert.rst clang-tools-extr

Re: [PATCH] D13052: Add NamingStyle option to modernize-loop-convert.

2015-09-22 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/LoopConvertUtils.cpp:815 @@ -815,3 +814,3 @@ std::string IteratorName; std::string ContainerName; if (TheContainer) This can be a StringRef to avoid some copies. Comment at:

Re: [PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.

2015-09-22 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MoveConstructorInitCheck.cpp:96 @@ +95,3 @@ + +void MoveConstructorInitCheck::handleMoveConstructor( +const MatchFinder::MatchResult &Result) { Other checks have separate options for the include style (

Re: r248370 - [ARM] Fix crash "-target arm -mcpu=generic", without "-march="

2015-09-23 Thread Alexander Kornienko via cfe-commits
On Wed, Sep 23, 2015 at 11:29 AM, Vladimir Sukharev via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: vsukharev > Date: Wed Sep 23 04:29:32 2015 > New Revision: 248370 > > URL: http://llvm.org/viewvc/llvm-project?rev=248370&view=rev > Log: > [ARM] Fix crash "-target arm -mcpu=generic"

Re: r248370 - [ARM] Fix crash "-target arm -mcpu=generic", without "-march="

2015-09-23 Thread Alexander Kornienko via cfe-commits
On Wed, Sep 23, 2015 at 5:27 PM, Vladimir Sukharev < vladimir.sukha...@arm.com> wrote: > Hi Alexander, > > Sorry, forgot to run valgrind. > valgrind??? I thought, every LLVM developer must know about ASAN ;) > I’m gonna commit quick follow-up (

Re: [PATCH] D13052: Add NamingStyle option to modernize-loop-convert.

2015-09-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A few minor comments. Comment at: clang-tidy/modernize/LoopConvertCheck.h:68 @@ -67,2 +67,3 @@ Confidence::Level MinConfidence; + VariableNamer::NamingStyle NamingStyle; }; The variable can be const, the one above as well. =

RE: r248370 - [ARM] Fix crash "-target arm -mcpu=generic", without "-march="

2015-09-23 Thread Alexander Kornienko via cfe-commits
On 23 Sep 2015 18:08, "Vladimir Sukharev" wrote: > > > > Ø valgrind??? I thought, every LLVM developer must know about ASAN ;) > > ASAN is not that great to quicktest such a small patches, and valgrind does its job in plug-and play manner. > > Or, which is recommended way to use ASAN as a pre-com

Re: [Diffusion] rL248438: Fix loop-convert for trivially copyable types.

2015-09-24 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: cfe-commits. alexfh added a comment. Test test test. Let's see how adding subscribers from the comments form in Diffusion works. /clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-basic.cpp:621 Testtesttest Users: klimek (Author) http://reviews.llvm.

Re: [Diffusion] rL248438: Fix loop-convert for trivially copyable types.

2015-09-24 Thread Alexander Kornienko via cfe-commits
On Thu, Sep 24, 2015 at 10:24 AM, Alexander Kornienko wrote: > alexfh added a subscriber: cfe-commits. > alexfh added a comment. > > Test test test. > > Let's see how adding subscribers from the comments form in Diffusion works. > > > /clang-tools-extra/trunk/test/clang-tidy/modernize-loop-conver

Re: [Diffusion] rL248438: Fix loop-convert for trivially copyable types.

2015-09-24 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Test-test-test. /clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-extra.cpp:669 Test3 /clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp:501 Test2. Users: klimek (Author) http://reviews.llvm.org/rL248438 __

Re: [Diffusion] rL248438: Fix loop-convert for trivially copyable types.

2015-09-24 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. /clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp:573 test6 /clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp:509 test5 Users: klimek (Author) http://reviews.llvm.org/rL248438 ___ cfe

Re: [Diffusion] rL248418: Fix loop-convert for const references to containers.

2015-09-24 Thread Alexander Kornienko via cfe-commits
alexfh added subscribers: angelgarcia, klimek, cfe-commits. alexfh added a comment. One trivial comment. Angel can probably fix this faster. /clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp:394 ``` // Handle references to containers. CType = CType->getNonReferenceType(); ``` U

Re: [PATCH] D13129: Solve comment on rL248418.

2015-09-24 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D13129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [Diffusion] rL248438: Fix loop-convert for trivially copyable types.

2015-09-24 Thread Alexander Kornienko via cfe-commits
Too bad. Making these two kinds of mails go to the same thread is hardly a trivial thing. And completely switching commit notifications to Phabricator is something not very realistic, I guess (at least, at this point). Giving up. On Thu, Sep 24, 2015 at 3:24 PM, Manuel Klimek wrote: > The bigge

Re: [PATCH] D13052: Add NamingStyle option to modernize-loop-convert.

2015-09-24 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good with a comment. Thank you! Comment at: test/clang-tidy/modernize-loop-convert-uppercase.cpp:48 @@ +47,3 @@ + // CHECK-FIXES: for (auto & NUMS_ELEM : NUMS) + // CH

Re: [PATCH] D13052: Add NamingStyle option to modernize-loop-convert.

2015-09-24 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Still looks good. http://reviews.llvm.org/D13052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D13079: [clang-tidy] Code factorization and cleanup in IdentifierNamingCheck

2015-09-24 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Please add more context to the diffs. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:508 @@ +507,3 @@ + auto &Failure = Failures[Decl]; + for (const auto &R : Failure.Usages) { +if (R == Range) berenm wrote: > Hopefull

Re: [PATCH] D13079: [clang-tidy] Code factorization and cleanup in IdentifierNamingCheck

2015-09-25 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good with a few comments. Please tell me, if you need me to commit the patch for you after you address the comments. Comment at: clang-tidy/readability/IdentifierNamin

[clang-tools-extra] r248594 - [clang-tidy] Updated misc-unused-raii documentation.

2015-09-25 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Sep 25 12:50:11 2015 New Revision: 248594 URL: http://llvm.org/viewvc/llvm-project?rev=248594&view=rev Log: [clang-tidy] Updated misc-unused-raii documentation. Modified: clang-tools-extra/trunk/clang-tidy/misc/UnusedRAIICheck.h clang-tools-extra/trunk/docs/clang-

Re: [PATCH] D13081: [clang-tidy] Implement FixitHints for identifier references in IdentifierNamingCheck

2015-09-25 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Awesome! This makes the check far more usable. See a few minor comments in-line. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:140 @@ +139,3 @@ + Finder->addMatcher( + namedDecl(unless(isExpansionInSystemHeader())).bind("decl"), this

Re: [PATCH] D13090: [clang-tidy] IdentifierNamingCheck should only emit warnings when declaration or usage is outside of macros

2015-09-26 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good. Should I submit this? http://reviews.llvm.org/D13090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

Re: [PATCH] D13071: [PATCH] New checker for mismatched operator new/operator delete definitions

2015-09-26 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Please add a documentation file. Comment at: clang-tidy/misc/NewDeleteOverloadsCheck.cpp:42 @@ +41,3 @@ +return Node.getNumParams() > 1; + else if (Node.getNumParams() == 1) +return false; Please no `else` after `return`. http:

Re: [PATCH] D12945: [PATCH] Add checker for objects that should not be value types

2015-09-26 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Please add a documentation file. Comment at: clang-tidy/misc/NonCopyableObjects.cpp:21 @@ +20,3 @@ + static const char *TypeNames[] = { +"::pthread_cond_t", +"::pthread_mutex_t", How about making these lists configurable or addin

[clang-tools-extra] r248699 - [clang-tidy] Removed a stray empty line in the docs.

2015-09-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Sep 28 03:52:55 2015 New Revision: 248699 URL: http://llvm.org/viewvc/llvm-project?rev=248699&view=rev Log: [clang-tidy] Removed a stray empty line in the docs. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-explicit-make-pair.rst Modified: c

[clang-tools-extra] r248700 - [clang-tidy] Code factorization and cleanup in IdentifierNamingCheck

2015-09-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Sep 28 03:59:12 2015 New Revision: 248700 URL: http://llvm.org/viewvc/llvm-project?rev=248700&view=rev Log: [clang-tidy] Code factorization and cleanup in IdentifierNamingCheck This is to level the ground a little bit, in preparation for the changes in http://reviews.llv

Re: [PATCH] D13079: [clang-tidy] Code factorization and cleanup in IdentifierNamingCheck

2015-09-28 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL248700: [clang-tidy] Code factorization and cleanup in IdentifierNamingCheck (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D13079?vs=35818&id=35842#toc Repository: rL LLVM h

Re: [PATCH] D13079: [clang-tidy] Code factorization and cleanup in IdentifierNamingCheck

2015-09-28 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:577-578 @@ -578,3 +576,4 @@ Diag << FixItHint::CreateReplacement( -CharSourceRange::getTokenRange(Range), Failure.Fixup); +SourceRange(SourceLocation::getFro

Re: [PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.

2015-09-28 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D12839#254384, @flx wrote: > I changed the check to also produce a fix that wraps the argument in > std::move(). > > When I modified the test include -isystem %S/Inputs/Headers it broke and only > produces warnings but no fixes anymore. Is ther

Re: [PATCH] D13071: [PATCH] New checker for mismatched operator new/operator delete definitions

2015-09-28 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/NewDeleteOverloadsCheck.cpp:66 @@ +65,3 @@ +namespace { +OverloadedOperatorKind GetCorrespondingOverload(const FunctionDecl *FD) { + switch (FD->getOverloadedOperator()) { http://llvm.org/docs/CodingStanda

Re: [PATCH] D12945: [PATCH] Add checker for objects that should not be value types

2015-09-28 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/NonCopyableObjects.cpp:21 @@ +20,3 @@ + static const char *TypeNames[] = { +"::pthread_cond_t", +"::pthread_mutex_t", aaron.ballman wrote: > alexfh wrote: > > How about making these lists configura

Re: [PATCH] D13071: [PATCH] New checker for mismatched operator new/operator delete definitions

2015-09-28 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/NewDeleteOverloadsCheck.cpp:168 @@ +167,3 @@ + SmallVector Diagnose; + for (const auto *O : Overloads) { +const auto &OI = std::find_if( aaron.ballman wrote: > alexfh wrote: > > Please don't use "O",

Re: [PATCH] D13071: [PATCH] New checker for mismatched operator new/operator delete definitions

2015-09-28 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/NewDeleteOverloadsCheck.cpp:170 @@ +169,3 @@ +const auto &OI = std::find_if( +Overloads.begin(), Overloads.end(), [&](const FunctionDecl *FD) { + if (FD == O) aaron.ballman wrote: > ale

Re: [PATCH] D13071: [PATCH] New checker for mismatched operator new/operator delete definitions

2015-09-29 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good with a few comments. Thanks for the new check! Do you think whether this could be a compiler warning some day? Comment at: clang-tidy/misc/NewDeleteOverloadsCheck

Re: [PATCH] D13081: [clang-tidy] Implement FixitHints for identifier references in IdentifierNamingCheck

2015-09-29 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:537 @@ +536,3 @@ + return; +Range.setBegin(Range.getBegin().getLocWithOffset(1)); + There are cases where this will fail (`~ ClassName()` or `??-ClassName` or `~\C

Re: [PATCH] D12945: [PATCH] Add checker for objects that should not be value types

2015-09-29 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/NonCopyableObjects.cpp:88 @@ +87,3 @@ + else if (E) +diag(E->getExprLoc(), "expression has suspicious type '%0'") +<< BD->getName(); What's a "suspicious type" and why should the user know abou

Re: [PATCH] D12945: [PATCH] Add checker for objects that should not be value types

2015-09-29 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. One of the error messages still needs to be made more clear. Otherwise looks good. Thank you! Comment at: clang-tidy/misc/NonCopyableObjects.cpp:88 @@ +87,3 @@ + else if (E

Re: [PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.

2015-09-29 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good. Please fix the patch and I can commit it for you. Comment at: clang-tidy/utils/IncludeSorter.cpp:289 @@ +288,3 @@ +IncludeSorter::IncludeStyle +IncludeSorter::toIn

Re: [PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.

2015-09-29 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D12839#256179, @flx wrote: > I had to convert the line endings of mis-move-constructor-init.cpp to unix > style otherwise the test would not correctly work. This took a long time to > debug since the checks failed complaining that error message

[clang-tools-extra] r248886 - [clang-tidy] Better diagnostic in tests when clang-tidy fails.

2015-09-30 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Sep 30 05:41:53 2015 New Revision: 248886 URL: http://llvm.org/viewvc/llvm-project?rev=248886&view=rev Log: [clang-tidy] Better diagnostic in tests when clang-tidy fails. Modified: clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py Modified: clang-tools-extr

[clang-tools-extra] r248895 - [clang-tidy] Fix an assertion in the readability-braces-around-statements check.

2015-09-30 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Sep 30 07:48:42 2015 New Revision: 248895 URL: http://llvm.org/viewvc/llvm-project?rev=248895&view=rev Log: [clang-tidy] Fix an assertion in the readability-braces-around-statements check. Modified: clang-tools-extra/trunk/clang-tidy/readability/BracesAroundStatement

[clang-tools-extra] r248899 - [clang-tidy] Added missing check lines, made the checking stricter.

2015-09-30 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Sep 30 08:32:42 2015 New Revision: 248899 URL: http://llvm.org/viewvc/llvm-project?rev=248899&view=rev Log: [clang-tidy] Added missing check lines, made the checking stricter. Modified: clang-tools-extra/trunk/test/clang-tidy/diagnostic.cpp Modified: clang-tools-extr

Re: [PATCH] D12945: [PATCH] Add checker for objects that should not be value types

2015-09-30 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D12945#256509, @aaron.ballman wrote: > I settled on "expression has opaque data structure type 'FILE'; type should > only be used as a pointer and not dereferenced" but we can tweak if that > still isn't quite right. Seems good. Thank you!

Re: [PATCH] D13081: [clang-tidy] Implement FixitHints for identifier references in IdentifierNamingCheck

2015-10-01 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. The patch looks good with one comment. I'll fix it and submit the patch for you. Thank you for working on this! Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:5

Re: [PATCH] D13081: [clang-tidy] Implement FixitHints for identifier references in IdentifierNamingCheck

2015-10-01 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:548 @@ +547,3 @@ + } + + if (const auto *Loc = Result.Nodes.getNodeAs("typeLoc")) { alexfh wrote: > Note, that I suggested to use `Loc->getType()->getDecl()`, which uses

[clang-tools-extra] r248996 - [clang-tidy] Implement FixitHints for identifier references in IdentifierNamingCheck

2015-10-01 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Oct 1 04:19:40 2015 New Revision: 248996 URL: http://llvm.org/viewvc/llvm-project?rev=248996&view=rev Log: [clang-tidy] Implement FixitHints for identifier references in IdentifierNamingCheck This diff requires http://reviews.llvm.org/D13079 to be applied first. I wasn'

Re: [PATCH] D13081: [clang-tidy] Implement FixitHints for identifier references in IdentifierNamingCheck

2015-10-01 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL248996: [clang-tidy] Implement FixitHints for identifier references in… (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D13081?vs=35974&id=36202#toc Repository: rL LLVM http:/

[clang-tools-extra] r248997 - [clang-tidy] fix add_new_check.py

2015-10-01 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Oct 1 04:23:20 2015 New Revision: 248997 URL: http://llvm.org/viewvc/llvm-project?rev=248997&view=rev Log: [clang-tidy] fix add_new_check.py Before this check, I would get the following error: Updating ./misc/CMakeLists.txt... Creating ./misc/NoReinterpret_castCheck.h..

Re: [PATCH] D13272: [clang-tidy] fix add_new_check.py

2015-10-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D13272#256305, @mgehre wrote: > Yes, please. Btw, I'm going to submit some diffs for clang-tidy checks (for > the CppCoreGuidelines). Which reviewers should I set on them? Please always add me to the reviewers and cfe-commits to Subscribers. A

Re: [PATCH] D13081: [clang-tidy] Implement FixitHints for identifier references in IdentifierNamingCheck

2015-10-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Also note, that in October I'll be mostly unavailable, but other clang-tidy contributors can do the review and help getting patches in: sbenza, bkramer, aaron.ballman. Repository: rL LLVM http://reviews.llvm.org/D13081 _

<    1   2   3   4   5   6   7   8   9   10   >