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 _

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

2015-10-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. The patch doesn't apply cleanly. Please update it. http://reviews.llvm.org/D12839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D13313: [clang-tidy] new check misc-no-reinterpret-cast

2015-10-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D13313#257476, @aaron.ballman wrote: > As a slightly more broad question: I think we should have a user-customizable > way to categorize these checks so that you can enable/disable them with > finer-grained control. Some of the existing checker

Re: [PATCH] D13313: [clang-tidy] new check misc-no-reinterpret-cast

2015-10-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D13313#256982, @vsk wrote: > The patch lgtm. Has there been a discussion on cfe-dev about adopting these > guidelines? > > I count well over 500 uses of reinterpret_cast in llvm+clang, so we might not > all be on the same page on this. I don'

Re: [PATCH] D13313: [clang-tidy] new check misc-no-reinterpret-cast

2015-10-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A high-level comment: the "misc" module is the place for checks that we didn't find (or create) a better category for. Here it's clear that we need a separate category, so we need a `CppCoreGuidelinesModule` and the `cppcoreguidelines-` check prefix. I also suggest using

Re: [clang-tools-extra] r249235 - Replace double negation of !FileID.isInvalid() with FileID.isValid().

2015-10-06 Thread Alexander Kornienko via cfe-commits
I'd say that the SourceLocation::isInvalid is more confusing than useful. Not sure why it was added in the first place. On Sat, Oct 3, 2015 at 12:46 PM, Yaron Keren via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: yrnkrn > Date: Sat Oct 3 05:46:20 2015 > New Revision: 249235 > > UR

Re: [PATCH] D13398: [clang-tidy] add check cppcoreguidelines-pro-type-const-cast

2015-10-06 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. It looks like potentially we're going to have tens of checks in this module. I wonder whether we should start organizing the checks somehow right away. For example, create a directory (and a namespace) for each profile. We'd need to adapt the add_new_check.py script to s

Re: [PATCH] D13504: Prevent modernize-use-auto from emitting a warning when 'auto' was already being used.

2015-10-07 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/modernize-use-auto-new.cpp:100 @@ -98,1 +99,3 @@ + // Don't warn when 'auto' is already being used. + auto aut = new MyType(); } Please add tests for `auto *` and `const auto *`. http://reviews.llvm.or

Re: [PATCH] D13368: [clang-tidy] add check cppcoreguidelines-pro-type-static-cast-downcast

2015-10-07 Thread Alexander Kornienko via cfe-commits
I think, it would be more consistent to have clang-tidy insert a link to the check documentation (on llvm.org) into each warning. The documentation pages already contain links to the relevant rules. We could even version documentation pages, if we think it's important (but afaiu, w

Re: [PATCH] D13440: [clang-tidy] Python script for easy check rename

2015-10-07 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/rename_check.py:3 @@ +2,3 @@ +# +#===- add_new_check.py - clang-tidy check generator --*- python -*--===# +# Please update the script name and description in the comment. Comment at: c

Re: [PATCH] D11784: [PATCH] clang-tidy check for incorrect move constructor initializers

2015-08-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D11784#220654, @aaron.ballman wrote: > Ping? Sorry for the delay. I'm on vacation currently. Will be back tomorrow. - Alex http://reviews.llvm.org/D11784 ___ cfe-commits mailing list cfe-commits

Re: [PATCH] D11946: Create clang-tidy module modernize. Add pass-by-value check.

2015-08-12 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Something weird happened with the file names in this CL after the latest update, e.g. there are both `clang-tidy/CMakeLists.txt` and `CMakeLists.txt`. How exactly did you create the Differential revision and update it? Comment at: ModernizeTidyModule.cp

Re: [PATCH] D11946: Create clang-tidy module modernize. Add pass-by-value check.

2015-08-12 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/PassByValueCheck.cpp:158 @@ +157,3 @@ + Compiler.getLangOpts(), + IncludeSorter::IS_LLVM)); + Compiler.getPreprocessor().addPPCallbacks(Inserter-

[clang-tools-extra] r244793 - [clang-tidy] Make FileOptionsProvider fields protected to make extending it easier

2015-08-12 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Aug 12 14:29:57 2015 New Revision: 244793 URL: http://llvm.org/viewvc/llvm-project?rev=244793&view=rev Log: [clang-tidy] Make FileOptionsProvider fields protected to make extending it easier Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h Modified: c

Re: [PATCH] D11946: Create clang-tidy module modernize. Add pass-by-value check.

2015-08-13 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Thanks for the updates. Looks good with a couple of nits. Comment at: clang-tidy/modernize/PassByValueCheck.cpp:83 @@ +82,3 @@ + public: +ExactlyOneUsageVisitor

Re: [PATCH] D11946: Create clang-tidy module modernize. Add pass-by-value check.

2015-08-13 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/PassByValueCheck.cpp:131 @@ +130,3 @@ + : ClangTidyCheck(Name, Context) { +std::string IncludeStyleStr = Options.get("IncludeStyle", "llvm"); +if (IncludeStyleStr == "llvm") { alexfh wrote: >

Re: [PATCH] D11946: Create clang-tidy module modernize. Add pass-by-value check.

2015-08-13 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/PassByValueCheck.cpp:134 @@ +133,3 @@ +: ClangTidyCheck(Name, Context), + IncludeStyle(StringSwitch( + Options.get("IncludeStyle", "llvm")) Thinking a bit more of this, w

Re: [PATCH] D11946: Create clang-tidy module modernize. Add pass-by-value check.

2015-08-13 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/PassByValueCheck.cpp:87 @@ +86,3 @@ +/// \brief Whether or not the parameter variable is referred only once in +/// the +/// given constructor. nit: clang-format doesn't properly reflow com

Re: [PATCH] D11946: Create clang-tidy module modernize. Add pass-by-value check.

2015-08-13 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. I patched this in and the tests fail for me: clang/tools/extra/test/clang-tidy/modernize-pass-by-value.cpp:4:17: error: expected string not found in input // CHECK-FIXES: #includ

Re: [PATCH] D11784: [PATCH] clang-tidy check for incorrect move constructor initializers

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A high level question: why is this check specific to base class initialization? Isn't the same issue possible when initializing members, for example? What would change if in your example `D` would have a member of type `B` instead of deriving from it? > One thing I am n

Re: [PATCH] D11784: [PATCH] clang-tidy check for incorrect move constructor initializers

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D11784#224386, @alexfh wrote: > Converting the script to python seems like the most universal approach. > Should be trivial with the `sh` python package, but I'm not sure whether we > can rely on it being installed. Actually, python sh doesn'

Re: [PATCH] D12017: Fix IncludeInserter/IncludeSorter bug.

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Thanks for fixing this! Looks good with a comment. Comment at: clang-tidy/IncludeSorter.cpp:118 @@ +117,3 @@ + if (SourceLocations.empty()) { +// If there are no includes

Re: [PATCH] D11784: [PATCH] clang-tidy check for incorrect move constructor initializers

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D11784#224421, @aaron.ballman wrote: > In http://reviews.llvm.org/D11784#224386, @alexfh wrote: > > > > One thing I am not certain of in this patch is how to test it. I have > > > some rudimentary tests, but am unable to test the "note:" diagnos

Re: [PATCH] D11784: [PATCH] clang-tidy check for incorrect move constructor initializers

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D11784#224424, @aaron.ballman wrote: > In http://reviews.llvm.org/D11784#220654, @aaron.ballman wrote: > > > > > > Do you think that this patch should have an option for the case where the > initialization cannot use a move constructor because t

[clang-tools-extra] r245042 - [clang-tidy] Fix IncludeInserter/IncludeSorter bug.

2015-08-14 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Aug 14 07:33:25 2015 New Revision: 245042 URL: http://llvm.org/viewvc/llvm-project?rev=245042&view=rev Log: [clang-tidy] Fix IncludeInserter/IncludeSorter bug. If there weren't any includes in the file, or all of them had 'IncludeKind' greater than the desired one, then '

Re: [PATCH] D12017: Fix IncludeInserter/IncludeSorter bug.

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh closed this revision. alexfh added a comment. Committed revision 245042. http://reviews.llvm.org/D12017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D11784: [PATCH] clang-tidy check for incorrect move constructor initializers

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D11784#224433, @aaron.ballman wrote: > In http://reviews.llvm.org/D11784#224430, @alexfh wrote: > > > In http://reviews.llvm.org/D11784#224421, @aaron.ballman wrote: > > > > > In http://reviews.llvm.org/D11784#224386, @alexfh wrote: > > > > > > >

Re: [PATCH] D11946: Create clang-tidy module modernize. Add pass-by-value check.

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Now the tests pass. Thanks for fixing the IncludeInserter bug! http://reviews.llvm.org/D11946 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang-tools-extra] r245045 - [clang-tidy] Create clang-tidy module modernize. Add pass-by-value check.

2015-08-14 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Aug 14 08:17:11 2015 New Revision: 245045 URL: http://llvm.org/viewvc/llvm-project?rev=245045&view=rev Log: [clang-tidy] Create clang-tidy module modernize. Add pass-by-value check. This is the first step for migrating cppmodernize to clang-tidy. http://reviews.llvm.org/

Re: [PATCH] D11946: Create clang-tidy module modernize. Add pass-by-value check.

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh closed this revision. alexfh added a comment. Committed revision 245045. http://reviews.llvm.org/D11946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r245046 - [clang-tidy] Don't use delegating constructors.

2015-08-14 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Aug 14 08:23:55 2015 New Revision: 245046 URL: http://llvm.org/viewvc/llvm-project?rev=245046&view=rev Log: [clang-tidy] Don't use delegating constructors. Modified: clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp Modified: clang-tools-extra/trun

[clang-tools-extra] r245052 - [clang-tidy] Move IncludeSorter.* and IncludeInserter.* to clang-tidy/utils/

2015-08-14 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Aug 14 09:31:31 2015 New Revision: 245052 URL: http://llvm.org/viewvc/llvm-project?rev=245052&view=rev Log: [clang-tidy] Move IncludeSorter.* and IncludeInserter.* to clang-tidy/utils/ This is better structurally and it also fixes a linker error in the configure build. A

Re: [PATCH] D9285: Add a KeepVirtual option to misc-use-override

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. What's the status of this patch? http://reviews.llvm.org/D9285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D9286: Insert override at the same line as the end of the function declaration

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. What's the status of this patch? http://reviews.llvm.org/D9286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for the delay. A few more comments, otherwise looks really nice. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:166 @@ +165,3 @@ + static llvm::Regex Splitter( + "(([a-z0-9A-Z]*)(_+)|([A-Z]?[a-z0-9]+)([A-Z]|$)|([A-Z]+)([A-Z]|$))"

Re: [clang-tools-extra] r245052 - [clang-tidy] Move IncludeSorter.* and IncludeInserter.* to clang-tidy/utils/

2015-08-14 Thread Alexander Kornienko via cfe-commits
Strange. No build bots complained about this so far. I'll take a look at this in an hour or so. On 14 Aug 2015 19:42, "İsmail Dönmez" wrote: > Hi, > > On Fri, Aug 14, 2015 at 5:31 PM, Alexander Kornienko via cfe-commits > wrote: > > Author: alexfh > >

Re: [clang-tools-extra] r245052 - [clang-tidy] Move IncludeSorter.* and IncludeInserter.* to clang-tidy/utils/

2015-08-14 Thread Alexander Kornienko via cfe-commits
Sorry for not posting an update earlier. I can't reproduce the build failure, and I see no build bots failing in a similar way. Must be something with your local configuration. On Fri, Aug 14, 2015 at 7:47 PM, Alexander Kornienko wrote: > Strange. No build bots complained about thi

Re: [clang-tools-extra] r245052 - [clang-tidy] Move IncludeSorter.* and IncludeInserter.* to clang-tidy/utils/

2015-08-14 Thread Alexander Kornienko via cfe-commits
... or this may have been fixed by r245144. In any case, please check again and report if anything is still broken. On Sat, Aug 15, 2015 at 7:39 AM, Alexander Kornienko wrote: > Sorry for not posting an update earlier. > > I can't reproduce the build failure, and I see no build b

r245204 - [clang-tidy] Make NumOccurrenceFlag for SourcePaths configurable.

2015-08-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Aug 17 05:01:42 2015 New Revision: 245204 URL: http://llvm.org/viewvc/llvm-project?rev=245204&view=rev Log: [clang-tidy] Make NumOccurrenceFlag for SourcePaths configurable. Added an additional ctor that takes a NumOccurrenceFlag parameter for the SourcePaths option. This

[clang-tools-extra] r245205 - [clang-tidy] Allow use of -list-checks option without need to pass source files.

2015-08-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Aug 17 05:03:27 2015 New Revision: 245205 URL: http://llvm.org/viewvc/llvm-project?rev=245205&view=rev Log: [clang-tidy] Allow use of -list-checks option without need to pass source files. Initialize CommonOptionsParser with ZeroOrOne NumOccurrenceFlag so callers can pass

Re: [PATCH] D12076: Add loop-convert check to clang-tidy.

2015-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Some initial comments. I'll need a bit more time to review this thoroughly. Comment at: test/clang-tidy/modernize-loop-convert.cpp:149 @@ +148,3 @@ +arr[i] = 0; + // CHECK-MESSAGES-NOT: :[[@LINE-2]]:3: warning: use range-based for loop instead + //

[clang-tools-extra] r245215 - [clang-tidy] Fix a use-after-free.

2015-08-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Aug 17 06:27:11 2015 New Revision: 245215 URL: http://llvm.org/viewvc/llvm-project?rev=245215&view=rev Log: [clang-tidy] Fix a use-after-free. Modified: clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp Modified: clang-tools-extra/trunk/clang-tidy/tool/ClangT

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-17 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 couple of comments. Tell me if you need me to submit the patch for you, once you address the comments. Thank you for the awesome new check! Comment at: cla

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D10933#225678, @berenm wrote: > In http://reviews.llvm.org/D10933#225671, @alexfh wrote: > > > Looks good with a couple of comments. Tell me if you need me to submit the > > patch for you, once you address the comments. > > > If you tell me how

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D10933#225696, @berenm wrote: > Indeed, I probably don't have rights on Clang/LLVM repositories. > > I have updated the patch with stricter tests - and found a missing break > statement (`clang-tidy/readability/IdentifierNamingCheck.cpp:201`).

Re: [PATCH] D12081: Add use-nullptr check to clang-tidy.

2015-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseNullptrCheck.cpp:16 @@ +15,3 @@ + +using namespace clang::ast_matchers; +using namespace clang; nit: The list should be sorted. Comment at: clang-tidy/modernize/UseNullptrCheck.cpp

Re: [PATCH] D12076: Add loop-convert check to clang-tidy.

2015-08-18 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D12076#226476, @angelgarcia wrote: > Split the tests in several files. Thank you! Seems better like this. A few more comments. Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:293 @@ +292,3 @@ +return nullptr; + co

[clang-tools-extra] r245310 - [clang-tidy] Fixed typos and formatting in a comment. NFC

2015-08-18 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Aug 18 11:43:07 2015 New Revision: 245310 URL: http://llvm.org/viewvc/llvm-project?rev=245310&view=rev Log: [clang-tidy] Fixed typos and formatting in a comment. NFC Modified: clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.h Modified: clang-tools-extra

Re: [PATCH] D9285: Add a KeepVirtual option to misc-use-override

2015-08-18 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D9285#224690, @ehsan wrote: > Sorry, I kind of dropped the ball here! > > At Mozilla we ended up deciding on allowing only a maximum of one of virtual, > final or override per function declaration, similar to the Google coding > style, so we wo

Re: [PATCH] D9286: Insert override at the same line as the end of the function declaration

2015-08-18 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D9286#224691, @ehsan wrote: > I should land this, but let's wait to see if we want > http://reviews.llvm.org/D9285 or not, since this patch is built on top of it. > If not, I can rebase it on top of master as well. We don't want http://revie

Re: [PATCH] D9286: Insert override at the same line as the end of the function declaration

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Looks good. Thanks for the fix! Repository: rL LLVM http://reviews.llvm.org/D9286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12076: Add loop-convert check to clang-tidy.

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Awesome! Thanks for converting this to a clang-tidy check! I'll submit the patch for you. http://reviews.llvm.org/D12076 ___ cfe-commits mailing

Re: [PATCH] D12076: Add loop-convert check to clang-tidy.

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh closed this revision. alexfh added a comment. Committed revision 245427. http://reviews.llvm.org/D12076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12081: Add use-nullptr check to clang-tidy.

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for the delay. Here are some more comments. Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:33 @@ -30,2 +32,3 @@ Opts["modernize-pass-by-value.IncludeStyle"] = "llvm"; // Also: "google". +Opts["modernize-use-nullptr.UserNullMacros"

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Another couple of comments (fine for a follow-up). Comment at: test/clang-tidy/readability-identifier-naming.cpp:72 @@ +71,3 @@ + +namespace FOO_NS { +// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: invalid case style for namespace 'FOO_NS' [readability-iden

[clang-tools-extra] r245429 - [clang-tidy] Add new IdentifierNaming check

2015-08-19 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Aug 19 06:15:36 2015 New Revision: 245429 URL: http://llvm.org/viewvc/llvm-project?rev=245429&view=rev Log: [clang-tidy] Add new IdentifierNaming check This check will try to enforce coding guidelines on the identifiers naming. It supports lower_case, UPPER_CASE, camelBac

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh closed this revision. alexfh added a comment. Committed revision 245429. http://reviews.llvm.org/D10933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12081: Add use-nullptr check to clang-tidy.

2015-08-19 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! I'll fix the last issue (see the comment below) and commit the patch for you. Comment at: clang-tidy/modernize/UseNullptrCheck.cpp:80 @@ +79,3 @@ + bool NeedsSpa

Re: [PATCH] D12081: Add use-nullptr check to clang-tidy.

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh closed this revision. alexfh added a comment. Committed revision 245434. http://reviews.llvm.org/D12081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r245434 - [clang-tidy] Add use-nullptr check to clang-tidy.

2015-08-19 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Aug 19 08:13:12 2015 New Revision: 245434 URL: http://llvm.org/viewvc/llvm-project?rev=245434&view=rev Log: [clang-tidy] Add use-nullptr check to clang-tidy. Move UseNullptr from clang-modernize to modernize module in clang-tidy. http://reviews.llvm.org/D12081 Patch by

Re: [PATCH] D11784: [PATCH] clang-tidy check for incorrect move constructor initializers

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for the long delay. Comment at: clang-tidy/misc/MoveConstructorInitCheck.cpp:40 @@ +39,3 @@ + for (const auto *Ctor : CopyCtor->getParent()->ctors()) { +if (Ctor->isMoveConstructor() && +Ctor->getAccess() <= AS_protected &&

[clang-tools-extra] r245458 - [clang-tidy] Fix LoopConvertCheck bug.

2015-08-19 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Aug 19 11:54:51 2015 New Revision: 245458 URL: http://llvm.org/viewvc/llvm-project?rev=245458&view=rev Log: [clang-tidy] Fix LoopConvertCheck bug. Fix LoopConvertCheck bug: StringRef to temporaries. Also add LLVM_ATTRIBUTE_UNUSED to ModernizeModuleAnchorDestination. htt

Re: [PATCH] D12157: Fix LoopConvertCheck bug.

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh closed this revision. alexfh added a comment. Committed revision 245458. http://reviews.llvm.org/D12157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12162: Remove reference.

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseNullptrCheck.cpp:178 @@ -177,3 +177,3 @@ CastSequenceVisitor(ASTContext &Context, SmallVector UserNullMacros, ClangTidyCheck &check) Please use Array

Re: [PATCH] D12162: Remove reference.

2015-08-19 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 http://reviews.llvm.org/D12162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

2015-08-19 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Aug 19 12:50:22 2015 New Revision: 245471 URL: http://llvm.org/viewvc/llvm-project?rev=245471&view=rev Log: [clang-tidy] Fix a bug in UseNullptrCheck. http://reviews.llvm.org/D12162 Patch by Angel Garcia! Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseNul

Re: [PATCH] D12162: Remove reference.

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh closed this revision. alexfh added a comment. Committed revision 245471. http://reviews.llvm.org/D12162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

2015-08-19 Thread Alexander Kornienko via cfe-commits
40149ba4694-19c4-4d7e-bec5-911270d8a58c > > Thanks > Pete > > On Aug 19, 2015, at 10:50 AM, Alexander Kornienko via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > Author: alexfh > Date: Wed Aug 19 12:50:22 2015 > New Revision: 245471 > > URL:

Re: [clang-tools-extra] r245434 - [clang-tidy] Add use-nullptr check to clang-tidy.

2015-08-19 Thread Alexander Kornienko via cfe-commits
writes: > > Alexander Kornienko via cfe-commits writes: > >> Author: alexfh > >> Date: Wed Aug 19 08:13:12 2015 > >> New Revision: 245434 > >> > >> URL: http://llvm.org/viewvc/llvm-project?rev=245434&view=rev > >> Log: > >>

[clang-tools-extra] r245511 - [clang-tidy] Add modernize-use-nullptr check, attempt 2.

2015-08-19 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Aug 19 17:21:37 2015 New Revision: 245511 URL: http://llvm.org/viewvc/llvm-project?rev=245511&view=rev Log: [clang-tidy] Add modernize-use-nullptr check, attempt 2. This patch re-applies r245434 and r245471 reverted in r245493, and changes the way custom null macros are c

Re: [clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

2015-08-19 Thread Alexander Kornienko via cfe-commits
I've committed the check with minor modifications and without the offending test in r245511. Could you verify that it works in your setup? -- Alex On Wed, Aug 19, 2015 at 11:41 PM, Pete Cooper wrote: > > On Aug 19, 2015, at 2:38 PM, Alexander Kornienko > wrote: > > The che

[clang-tools-extra] r245517 - [clang-tidy] Work around failure in Darwin.

2015-08-19 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Aug 19 18:03:23 2015 New Revision: 245517 URL: http://llvm.org/viewvc/llvm-project?rev=245517&view=rev Log: [clang-tidy] Work around failure in Darwin. Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp Modified: clang-tools-extra/trunk/clang-

Re: [clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

2015-08-19 Thread Alexander Kornienko via cfe-commits
Clang Tools :: clang-tidy/modernize-use-nullptr.cpp > > I'll poke at it for a minute and see if there's something obvious I can > do, but running the run line manually just seems to return 127 with no > output for me (as opposed to the output that's printed correctly un

[clang-tools-extra] r245524 - [clang-tidy] Fix use-after-free in UseNullptrCheck.

2015-08-19 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Aug 19 18:57:34 2015 New Revision: 245524 URL: http://llvm.org/viewvc/llvm-project?rev=245524&view=rev Log: [clang-tidy] Fix use-after-free in UseNullptrCheck. Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp clang-tools-extra/trunk/clang

Re: [clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

2015-08-19 Thread Alexander Kornienko via cfe-commits
ests are still failing. > > Alexander Kornienko writes: > > Something weird happens with options reading. Submitted a possible > workaround > > in r245517. > > > > On Thu, Aug 20, 2015 at 12:48 AM, Justin Bogner > wrote: > > > > Locally, it s

[PATCH] D12180: [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests.

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh created this revision. alexfh added reviewers: aaron.ballman, chapuni. alexfh added a subscriber: cfe-commits. Add check_clang_tidy.py script that is functionally identical to the check_clang_tidy.py, but should also be functional on windows. I've verified that the script works on linux. W

Re: [PATCH] D12180: [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests.

2015-08-19 Thread Alexander Kornienko via cfe-commits
alexfh updated this revision to Diff 32645. alexfh added a comment. Removed an unused import. http://reviews.llvm.org/D12180 Files: test/clang-tidy/arg-comments.cpp test/clang-tidy/check_clang_tidy.py test/clang-tidy/google-explicit-constructor.cpp test/clang-tidy/google-explicit-make-p

Re: [clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

2015-08-19 Thread Alexander Kornienko via cfe-commits
The tests are passing now <http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_check/6531/>. Will now try to add back the piece of test that was removed and see whether it works. On Thu, Aug 20, 2015 at 2:00 AM, Alexander Kornienko wrote: > After looking at the code once again, I

[clang-tools-extra] r245533 - [clang-tidy] Add back a test with a custom NULL macro. Remove redundant default.

2015-08-19 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Aug 19 20:44:14 2015 New Revision: 245533 URL: http://llvm.org/viewvc/llvm-project?rev=245533&view=rev Log: [clang-tidy] Add back a test with a custom NULL macro. Remove redundant default. Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp

Re: [clang-tools-extra] r245548 - [clang-tidy] Fold the meat of the UseNullPtrCheck into an anonymous namespace.

2015-08-20 Thread Alexander Kornienko via cfe-commits
Thanks, Benjamin! On Thu, Aug 20, 2015 at 11:47 AM, Benjamin Kramer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: d0k > Date: Thu Aug 20 04:47:06 2015 > New Revision: 245548 > > URL: http://llvm.org/viewvc/llvm-project?rev=245548&view=rev > Log: > [clang-tidy] Fold the meat of th

Re: [PATCH] D11784: [PATCH] clang-tidy check for incorrect move constructor initializers

2015-08-20 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D11784#227939, @aaron.ballman wrote: > Addressed review comments. I re-ran the updated patch against LLVM and Clang, > and there were some more false positives that I would like to address if > possible. It seems my previous run against the sou

[clang-tools-extra] r245561 - [clang-tidy] Fix bug in modernize-loop-convert check.

2015-08-20 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Aug 20 08:18:23 2015 New Revision: 245561 URL: http://llvm.org/viewvc/llvm-project?rev=245561&view=rev Log: [clang-tidy] Fix bug in modernize-loop-convert check. http://reviews.llvm.org/D12186 Patch by Angel Garcia! Modified: clang-tools-extra/trunk/clang-tidy/moder

Re: [PATCH] D12186: Fix bug in modernize-loop-convert check.

2015-08-20 Thread Alexander Kornienko via cfe-commits
alexfh closed this revision. alexfh added a comment. Thanks! Committed revision 245561. http://reviews.llvm.org/D12186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D11784: [PATCH] clang-tidy check for incorrect move constructor initializers

2015-08-20 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. > With the triviality implementation, I now get zero false positives (and zero > true positives) in the Clang and LLVM source base. Awesome! Thanks for working on this! LGTM http://reviews

Re: [PATCH] D12180: [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests.

2015-08-20 Thread Alexander Kornienko via cfe-commits
alexfh updated this revision to Diff 32705. alexfh marked 4 inline comments as done. alexfh added a comment. Addressed review comments. http://reviews.llvm.org/D12180 Files: test/clang-tidy/arg-comments.cpp test/clang-tidy/check_clang_tidy.py test/clang-tidy/google-explicit-constructor.cp

Re: [PATCH] D12180: [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests.

2015-08-20 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/arg-comments.cpp:1 @@ -1,3 +1,2 @@ -// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-argument-comment %t -// REQUIRES: shell +// RUN: $(dirname %s)/check_clang_tidy.py %s misc-argument-comment %t chapuni

Re: [Diffusion] rL245435: clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp: Appease…

2015-08-20 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thanks for the explanation. FTR, this check on line 190 fails with -fdelayed-template-parsing: // CHECK-FIXES: {{^}}GlobalFunction(1, 2);{{$}} Users: chapuni (Author) http://reviews.llvm.org/rL245435 ___ cfe-commit

[clang-tools-extra] r245583 - [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests.

2015-08-20 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Aug 20 12:58:07 2015 New Revision: 245583 URL: http://llvm.org/viewvc/llvm-project?rev=245583&view=rev Log: [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. Summary: Add check_clang_tidy.py script that is functionally identical to the c

Re: [PATCH] D12180: [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests.

2015-08-20 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL245583: [clang-tidy] Use a python script instead of a shell script to run clang-tidy… (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D12180?vs=32705&id=32712#toc Repository: r

Re: [PATCH] D12180: [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests.

2015-08-20 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/google-readability-casting.c:7 @@ -6,3 +6,3 @@ // RUN: clang-tidy --checks=-*,google-readability-casting -header-filter='.*' %t.main_file.cpp -- -I%S -DTEST_INCLUDE -x c++ | FileCheck %s -check-prefix=CHECK-MESSAGES -imp

[clang-tools-extra] r245586 - [clang-tidy] Use check_clang_tidy.py instead of check_clang_tidy.sh by default.

2015-08-20 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Aug 20 13:11:13 2015 New Revision: 245586 URL: http://llvm.org/viewvc/llvm-project?rev=245586&view=rev Log: [clang-tidy] Use check_clang_tidy.py instead of check_clang_tidy.sh by default. Modified: clang-tools-extra/trunk/clang-tidy/add_new_check.py Modified: clang-t

[clang-tools-extra] r245587 - [clang-tidy] Mention check_clang_tidy.py instead of check_clang_tidy.sh in the docs.

2015-08-20 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Aug 20 13:16:13 2015 New Revision: 245587 URL: http://llvm.org/viewvc/llvm-project?rev=245587&view=rev Log: [clang-tidy] Mention check_clang_tidy.py instead of check_clang_tidy.sh in the docs. Modified: clang-tools-extra/trunk/docs/clang-tidy.rst Modified: clang-too

Re: [PATCH] D12031: Const std::move() argument ClangTidy check

2015-08-20 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for tackling this! A high-level comment: the check needs to be somewhat more general. Const-qualified variables are just a specific case of an rvalue. The check should warn on all usages of std::move with an rvalue argument (except in templates with arguments

Re: [PATCH] D12031: Const std::move() argument ClangTidy check

2015-08-21 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A few more comments. Comment at: test/clang-tidy/move-const-arg.cpp:1 @@ +1,2 @@ +// RUN: $(dirname %s)/check_clang_tidy.sh %s move-const-arg %t +// REQUIRES: shell Please use check_clang_tidy.py instead: // RUN: %python %S/check_clan

Re: [clang-tools-extra] r245683 - Tweak clang-tidy-diff.py to recognize "filename" in the diff ourput.

2015-08-21 Thread Alexander Kornienko via cfe-commits
On Fri, Aug 21, 2015 at 11:27 AM, Yaron Keren via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: yrnkrn > Date: Fri Aug 21 04:27:24 2015 > New Revision: 245683 > > URL: http://llvm.org/viewvc/llvm-project?rev=245683&view=rev > Log: > Tweak clang-tidy-diff.py to recognize "filename" in

Re: [PATCH] D12231: Add use-auto check to modernize module.

2015-08-21 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:45 @@ +44,3 @@ + + // The following test is based on DeclPrinter::VisitVarDecl() o find if an + // initializer is implicit o not. s/o find/to find/? s/o not/or not/? ==

Re: [PATCH] D12231: Add use-auto check to modernize module.

2015-08-21 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:45 @@ +44,3 @@ + + // The following test is based on DeclPrinter::VisitVarDecl() or find if an + // initializer is implicit or not. I can't parse it with 'or'. Did you mean something

[clang-tools-extra] r245699 - [clang-tidy] Remove check_clang_tidy.sh that has been replaced with check_clang_tidy.py.

2015-08-21 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Aug 21 07:41:14 2015 New Revision: 245699 URL: http://llvm.org/viewvc/llvm-project?rev=245699&view=rev Log: [clang-tidy] Remove check_clang_tidy.sh that has been replaced with check_clang_tidy.py. Removed: clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.sh

Re: [PATCH] D12231: Add use-auto check to modernize module.

2015-08-21 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LGTM. Thanks! http://reviews.llvm.org/D12231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

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