Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-04 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Looks like you've forgotten to upload a new patch. http://reviews.llvm.org/D15823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [clang-tools-extra] r256562 - [clang-tidy] Fix a use-after-free bug found by asan

2016-01-05 Thread Alexander Kornienko via cfe-commits
r clang and clang-format > (tools/clang-format/fuzzer, ./tools/clang-fuzzer) > > > On Tue, Dec 29, 2015 at 8:14 AM, Alexander Kornienko via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: alexfh >> Date: Tue Dec 29 10:14:38 2015 >> New Revision: 256

Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-07 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A few more comments. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:22 @@ +21,3 @@ + +bool VirtualNearMissCheck::isOverrideMethod(const CXXMethodDecl *MD) { + return MD->size_overridden_methods() > 0 || MD->hasAttr(); This should b

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Looks good with a few nits. Please fix them and I'll submit the patch for you. Thank you for working on this! Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:23 @@ +22,3 @@ +AST_MATCHER(NamedDecl, isHeaderFileExtension) { + SourceManager& SM =

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/misc-definitions-in-headers.hpp:5 @@ +4,3 @@ +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: function 'f' defined in a header file; function definitions in header files can lead to ODR violations +// CHECK-FIXES: inline int f

[clang-tools-extra] r257176 - [clang-tidy] Use proper capitalization and punctuation for diagnostic messages.

2016-01-08 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jan 8 09:21:40 2016 New Revision: 257176 URL: http://llvm.org/viewvc/llvm-project?rev=257176&view=rev Log: [clang-tidy] Use proper capitalization and punctuation for diagnostic messages. Use diagnostic parameters where possible instead of string concatenation. Modified:

[clang-tools-extra] r257178 - [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jan 8 10:37:11 2016 New Revision: 257178 URL: http://llvm.org/viewvc/llvm-project?rev=257178&view=rev Log: [clang-tidy] Add non-inline function definition and variable definition check in header files. Summary: The new check will find all functionand variable definition

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257178: [clang-tidy] Add non-inline function definition and variable definition check… (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D15710?vs=44318&id=44331#toc Repository:

Re: [clang-tools-extra] r257178 - [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Alexander Kornienko via cfe-commits
sort of like the missing-declaration warning in Clang, no? > (granted, it's a bit more direct & thus perhaps easier to use, but fulfills > a similar purpose) > > On Fri, Jan 8, 2016 at 8:37 AM, Alexander Kornienko via cfe-commits < > cfe-commits@lists.llvm.org> wrote: >

[clang-tools-extra] r257320 - [clang-tidy] Fix a false positive in google-runtime-memset

2016-01-11 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Jan 11 04:26:29 2016 New Revision: 257320 URL: http://llvm.org/viewvc/llvm-project?rev=257320&view=rev Log: [clang-tidy] Fix a false positive in google-runtime-memset google-runtime-memset no longer issues a warning if the fill char value is known to be an invalid fill ch

Re: [PATCH] D15796: [PATCH] clang-tidy documentation redirects

2016-01-11 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for the delay and thanks for pinging me. Comment at: docs/clang-tidy/checks/cert-dcl54-cpp.rst:6 @@ +5,3 @@ +cert-dcl54-cpp +== + aaron.ballman wrote: > > We need to teach add_new_check.py to retain (or automatically gen

Re: [PATCH] D15796: [PATCH] clang-tidy documentation redirects

2016-01-11 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/checks/cert-dcl54-cpp.rst:7 @@ +6,3 @@ +== + +The cert-dcl54-cpp checker is an alias, please see This seems to do what we need (full file is here {F1298675}): ``` diff --git a/clang-tidy/add_ne

Re: [PATCH] D15796: [PATCH] clang-tidy documentation redirects

2016-01-11 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/checks/cert-dcl54-cpp.rst:7 @@ +6,3 @@ +== + +The cert-dcl54-cpp checker is an alias, please see alexfh wrote: > This seems to do what we need (full file is here {F1298675}): > > ``` > diff --g

Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-11 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A few minor comments. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:23 @@ +22,3 @@ +/// Finds out if the given method overrides some method. +bool isOverrideMethod(const CXXMethodDecl *MD) { + return MD->size_overridden_methods() > 0 || MD->hasAtt

Re: [PATCH] D15796: [PATCH] clang-tidy documentation redirects

2016-01-11 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thank you! http://reviews.llvm.org/D15796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-13 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for the patch! I have a few concerns though. See inline comments. Comment at: clang-tidy/ClangTidy.cpp:348 @@ +347,3 @@ + LocalName.str() }; + for (const auto &Name : Names) { +auto Iter = CheckOptions.fi

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-13 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/ClangTidyOptions.h:216 @@ +215,3 @@ +/// HeaderFileExtensions. +bool endWithHeaderFileExtensions(llvm::StringRef FileName, + llvm::StringRef HeaderFileExtensions); hokein wrote: >

Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-13 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 one nit. I'll update the comment myself and commit the patch for you. Thank you for the contribution! Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:60

[clang-tools-extra] r257599 - Support virtual-near-miss check.

2016-01-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Jan 13 08:16:35 2016 New Revision: 257599 URL: http://llvm.org/viewvc/llvm-project?rev=257599&view=rev Log: Support virtual-near-miss check. Summary: Virtual function override near miss detection. Function complete. Test complete. Do not conduct Fix for now. Reviewers:

[clang-tools-extra] r257600 - [clang-tidy] Slightly clarified comments.

2016-01-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Jan 13 08:16:43 2016 New Revision: 257600 URL: http://llvm.org/viewvc/llvm-project?rev=257600&view=rev Log: [clang-tidy] Slightly clarified comments. Modified: clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.h Modified: clang-tools-extra/trunk/clang-tidy

Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-13 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257599: Support virtual-near-miss check. (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D15823?vs=44661&id=44746#toc Repository: rL LLVM http://reviews.llvm.org/D15823 Files

Re: [PATCH] D15528: Teach clang-tidy how to -Werror checks.

2016-01-13 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Looks good with a couple of nits. I'll be happy to submit your patch once you address the comments. Also, please include more context in your patches. See http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface. Comment at: clan

Re: [PATCH] D15528: Teach clang-tidy how to -Werror checks.

2016-01-13 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: jroelofs. alexfh added a comment. In http://reviews.llvm.org/D15528#326031, @jroelofs wrote: > Hmm. There's no "close revision" button. Abandoning it in lieu of closing it. Weird. That's probably because I've not marked it "Accepted". Now I tried a few other actions

Re: [PATCH] D16152: [clang-tidy] Add check performance-faster-string-find

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Awesome! See a few comments inline. Comment at: clang-tidy/performance/FasterStringFindCheck.cpp:51 @@ +50,3 @@ + const auto StringFindFunctions = + anyOf(hasName("find"), hasName("rfind"), hasName("find_first_of"), +hasName("find_first_

Re: [PATCH] D16179: [clang-tidy] Handle decayed types and other improvements in VirtualNearMiss check.

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. > ... What about a configuration option to also report near misses when only a > qualifier is missing? Might be a useful thing. We should first check if it makes sense to always ignore a qualifier. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:

Re: [PATCH] D16183: Added CheckName field to YAML report

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. I'm not sure `tooling::Replacement` is the best place to store check name. Maybe create a separate wrapper class and serialize it instead (clang-apply-replacements will have to be changed to support this format as well). This could be `ClangTidyDiagnostic` or just `Diagn

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/tool/ClangTidyMain.cpp:78 @@ +77,3 @@ +static cl::opt +HeaderFileExtensions("header-file-extensions", + cl::desc("File extensions that regard as header file.\n" hokein wrote: > alexfh wrote:

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/ClangTidyOptions.h:216 @@ +215,3 @@ +/// HeaderFileExtensions. +bool endWithHeaderFileExtensions(llvm::StringRef FileName, + llvm::StringRef HeaderFileExtensions); aaron.ballman w

Re: [PATCH] D16152: [clang-tidy] Add check performance-faster-string-find

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/performance/FasterStringFindCheck.cpp:25 @@ +24,3 @@ + SmallVector Classes; + Option.split(Classes, ","); + return std::vector(Classes.begin(), Classes.end()); aaron.ballman wrote: > It might be nice for this

Re: [PATCH] D16183: Added CheckName field to YAML report

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thanks for addressing the comments. However, the main concern is this: In http://reviews.llvm.org/D16183#326759, @alexfh wrote: > I'm not sure `tooling::Replacement` is the best place to store check name. > Maybe create a separate wrapper class and serialize it instead

Re: [PATCH] D16152: [clang-tidy] Add check performance-faster-string-find

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/performance/FasterStringFindCheck.cpp:25 @@ +24,3 @@ + SmallVector Classes; + Option.split(Classes, ","); + return std::vector(Classes.begin(), Classes.end()); aaron.ballman wrote: > alexfh wrote: > > aaron.b

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/ClangTidyOptions.h:216 @@ +215,3 @@ +/// HeaderFileExtensions. +bool endWithHeaderFileExtensions(llvm::StringRef FileName, + llvm::StringRef HeaderFileExtensions); aaron.ballman w

Re: [PATCH] D15506: [ASTMatchers] Allow hasName() to look through inline namespaces

2016-01-15 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. Manuel, can you take a look at this? http://reviews.llvm.org/D15506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r257900 - [clang-tidy] Fix a copy-paste error.

2016-01-15 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jan 15 10:16:47 2016 New Revision: 257900 URL: http://llvm.org/viewvc/llvm-project?rev=257900&view=rev Log: [clang-tidy] Fix a copy-paste error. Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp Modified: clang-tools-extra/trunk/clang-tidy/

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-15 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Makes sense. One comment re: documentation. Comment at: docs/clang-tidy/checks/performance-inefficient-algorithm.rst:1 @@ -1,2 +1,2 @@ -.. title:: clang-tidy - misc-inefficient-algorithm +.. title:: clang-tidy - performance-inefficient-algorithm ---

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-15 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Makes sense. One comment re: documentation. Comment at: docs/clang-tidy/checks/performance-inefficient-algorithm.rst:1 @@ -1,2 +1,2 @@ -.. title:: clang-tidy - misc-inefficient-algorithm +.. title:: clang-tidy - performance-inefficient-algorithm ---

Re: [PATCH] D16179: [clang-tidy] Handle decayed types and other improvements in VirtualNearMiss check.

2016-01-16 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:54-55 @@ -53,16 +53,4 @@ // Both types must be pointers or references to classes. - if (const auto *DerivedPT = DerivedReturnTy->getAs()) { -if (const auto *BasePT = BaseReturnTy->getAs())

Re: [PATCH] D16270: [clang-tidy] Python scripts shebang fixes

2016-01-18 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! Do you need me to submit the patch? http://reviews.llvm.org/D16270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

Re: [PATCH] D16179: [clang-tidy] Handle decayed types and other improvements in VirtualNearMiss check.

2016-01-18 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:240 @@ -247,2 +239,3 @@ unsigned EditDistance = -BaseMD->getName().edit_distance(DerivedMD->getName()); +StringRef(BaseMD->getNameAsString()) +.edit_

[clang-tools-extra] r258098 - [clang-tidy] Fixed wording ("clang-tidy check", not "clang-tidy checker")

2016-01-18 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Jan 18 16:51:09 2016 New Revision: 258098 URL: http://llvm.org/viewvc/llvm-project?rev=258098&view=rev Log: [clang-tidy] Fixed wording ("clang-tidy check", not "clang-tidy checker") Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/cert-dcl03-c.rst clang-to

Re: [clang-tools-extra] r258098 - [clang-tidy] Fixed wording ("clang-tidy check", not "clang-tidy checker")

2016-01-18 Thread Alexander Kornienko via cfe-commits
No worries, I reviewed at least some of these changes and haven't found the issues, but was later pointed to them by a community member ;) On Mon, Jan 18, 2016 at 11:58 PM, Aaron Ballman wrote: > On Mon, Jan 18, 2016 at 5:51 PM, Alexander Kornienko via cfe-commits > wrote: > &g

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 @@ -57,3 +56,1 @@ -CheckFactories.registerCheck( -"misc-inefficient-algorithm"); CheckFactories.registerCheck( alexfh wrote: > aaron.ballman wrote: > > This will break

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 @@ -57,3 +56,1 @@ -CheckFactories.registerCheck( -"misc-inefficient-algorithm"); CheckFactories.registerCheck( aaron.ballman wrote: > This will break projects that ena

Re: [PATCH] D16286: [clang-tidy] Readability check for redundant parenthesis in return expression.

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A high-level comment: why do we want to limit this check to only remove parentheses from `return ()`? Anything wrong with removing unnecessary parentheses everywhere (except for macro bodies)? Comment at: clang-tidy/readability/ReturnWithRedundantParens

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 @@ -57,3 +56,1 @@ -CheckFactories.registerCheck( -"misc-inefficient-algorithm"); CheckFactories.registerCheck( aaron.ballman wrote: > alexfh wrote: > > alexfh wrote: >

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 @@ -57,3 +56,1 @@ -CheckFactories.registerCheck( -"misc-inefficient-algorithm"); CheckFactories.registerCheck( alexfh wrote: > aaron.ballman wrote: > > alexfh wrote: >

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/RedundantReturnCheck.h:26 @@ +25,3 @@ +/// http://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-return.html +class RedundantReturnCheck : public ClangTidyCheck { +public: aaron.ballma

Re: [PATCH] D16267: Handle C++11 brace initializers in readability-braces-around-statements

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/BracesAroundStatementsCheck.cpp:63-72 @@ -62,2 +62,12 @@ tok::TokenKind TokKind = getTokenKind(Loc, SM, Context); + // If we are at "}", but the following token is ";", then we could be + // reading a statement

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/RedundantReturnCheck.cpp:36 @@ +35,3 @@ +checkRedundantReturn(Result, Fn); + } else if (const auto *For = Result.Nodes.getNodeAs("for")) { +checkRedundantContinue(Result, dyn_cast(For->getBody())); -

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Alexander Kornienko via cfe-commits
On Tue, Jan 19, 2016 at 4:28 PM, Aaron Ballman wrote: > On Tue, Jan 19, 2016 at 10:20 AM, Alexander Kornienko > wrote: > > alexfh added inline comments. > > > > > > Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 > > @@ -57,3 +56,1 @@ > > -CheckFactories.registerCheck( > >

[clang-tools-extra] r258133 - [clang-tidy] Python scripts shebang fixes

2016-01-19 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Jan 19 10:10:39 2016 New Revision: 258133 URL: http://llvm.org/viewvc/llvm-project?rev=258133&view=rev Log: [clang-tidy] Python scripts shebang fixes Summary: This patch fixes shebang lines in Python script files. Most Python scripts in LLVM & Clang are using this sheban

Re: [PATCH] D16270: [clang-tidy] Python scripts shebang fixes

2016-01-19 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL258133: [clang-tidy] Python scripts shebang fixes (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D16270?vs=45106&id=45265#toc Repository: rL LLVM http://reviews.llvm.org/D162

Re: [PATCH] D16183: Added CheckName field to YAML report

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D16183#329475, @Elijah_Th wrote: > What kind of wrapper should it be? > I was thinking of this kind: > > class ExtendedReplacement : public Replacement { No, I meant a different thing: serialize ClangTidyError or make a specialized structur

Re: [PATCH] D16310: new clang-tidy checker misc-long-cast

2016-01-21 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/LongCastCheck.cpp:21 @@ +20,3 @@ + Finder->addMatcher( + returnStmt( + has(cStyleCastExpr(has(binaryOperator(anyOf(hasOperatorName("+"), Any reason to limit this to returnStmt, varDecl and as

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-21 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/UserDefinedCopyWithoutAssignmentCheck.cpp:32 @@ +31,3 @@ + + if (MatchedDecl->isImplicit()) +return; This check should be done in the matcher. Comment at: clang-tidy/misc/UserDefinedC

Re: [PATCH] D16310: new clang-tidy checker misc-long-cast

2016-01-21 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/LongCastCheck.cpp:21 @@ +20,3 @@ + Finder->addMatcher( + returnStmt( + has(cStyleCastExpr(has(binaryOperator(anyOf(hasOperatorName("+"), danielmarjamaki wrote: > alexfh wrote: > > Any reason

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-21 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/checks/misc-user-defined-copy-without-assignment.rst:6 @@ +5,3 @@ + +MSVC 2015 will generate an assignment operator even if the user defines a copy constructor. +This check finds classes with a user-defined (including del

Re: [clang-tools-extra] r258356 - Make modernize-use-default tolerant of delayed template parsing; this code was previously causing failed assertions because dyn_cast was being passed a null pointer d

2016-01-21 Thread Alexander Kornienko via cfe-commits
I'm fine with including this to 3.8. BTW, I'm working on release notes. On Thu, Jan 21, 2016 at 6:01 PM, Hans Wennborg wrote: > I'm fine with it. Alex, what do you think? > > On Wed, Jan 20, 2016 at 3:07 PM, Aaron Ballman > wrote: > > Uncertain whether this meets the bar for inclusion in 3.8. >

Re: [PATCH] D16179: [clang-tidy] Handle decayed types and other improvements in VirtualNearMiss check.

2016-01-21 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! http://reviews.llvm.org/D16179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

Re: [PATCH] D16377: Ensure virtual-near-miss does not crash on functions without names

2016-01-22 Thread Alexander Kornienko via cfe-commits
Should be fixed in http://reviews.llvm.org/D16179. On Jan 20, 2016 23:55, "Aaron Ballman" wrote: > aaron.ballman updated this revision to Diff 45451. > aaron.ballman added a comment. > > Now checking that both the base *and* the derived functions have names. > > > http://reviews.llvm.org/D16377 >

Re: [PATCH] D16377: Ensure virtual-near-miss does not crash on functions without names

2016-01-22 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. Should be fixed in http://reviews.llvm.org/D16179. http://reviews.llvm.org/D16377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

Re: [PATCH] D16152: [clang-tidy] Add check performance-faster-string-find

2016-01-22 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/performance/FasterStringFindCheck.cpp:30 @@ +29,3 @@ +Class = Class.trim(); +if (!Class.empty()) + Result.push_back(Class); aaron.ballman wrote: > > Also changed the separator to be ';' instead of '

[clang-tools-extra] r258801 - Fix crashing on user-defined conversion.

2016-01-26 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Jan 26 04:56:27 2016 New Revision: 258801 URL: http://llvm.org/viewvc/llvm-project?rev=258801&view=rev Log: Fix crashing on user-defined conversion. Summary: Fix the assertion failure for the user-defined conversion method. e.g.: operator bool() Reviewers: alexfh, aaron

Re: [PATCH] D16536: Fix crashing on user-defined conversion.

2016-01-26 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL258801: Fix crashing on user-defined conversion. (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D16536?vs=45873&id=45963#toc Repository: rL LLVM http://reviews.llvm.org/D1653

Re: [PATCH] D16536: Fix crashing on user-defined conversion.

2016-01-26 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for the fix! Committed as r258801. Repository: rL LLVM http://reviews.llvm.org/D16536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16578: [clang-tidy] bug fix: Don't warn on partial template specialization in `misc-definitions-in-headers` check.

2016-01-26 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Do you need me to commit the patch? Repository: rL LLVM http://reviews.llvm.org/D16578 ___ cfe-commits mailing list cfe-commits@lists.llvm

Re: [PATCH] D16566: [Clang-tidy] Fix Clang-tidy modernize-use-override warning in unittests/clang-tidy/IncludeInserterTest.cpp; other minor fixes

2016-01-26 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: unittests/clang-tidy/IncludeInserterTest.cpp:101 @@ -100,3 +100,3 @@ : IncludeInserterCheckBase(CheckName, Context) {} - virtual ~CXXSystemIncludeInserterCheck() {} + ~CXXSystemIncludeInserterCheck() override = default;

Re: [PATCH] D16517: ClangTidy check to flag uninitialized builtin and pointer fields.

2016-01-26 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A high-level comment: I think, this comment still applies. I'm also slightly concerned about having this check in misc-, since the check isn't universally applicable (e.g. based on a couple of discussions, I guess LLVM community wo

[clang-tools-extra] r258925 - [clang-tidy] Use relative URL for redirection.

2016-01-27 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Jan 27 05:37:12 2016 New Revision: 258925 URL: http://llvm.org/viewvc/llvm-project?rev=258925&view=rev Log: [clang-tidy] Use relative URL for redirection. Modified: clang-tools-extra/trunk/docs/clang-tidy.rst Modified: clang-tools-extra/trunk/docs/clang-tidy.rst URL:

[clang-tools-extra] r258924 - Add clang-tools-extra documentation to the CMake build.

2016-01-27 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Jan 27 05:37:08 2016 New Revision: 258924 URL: http://llvm.org/viewvc/llvm-project?rev=258924&view=rev Log: Add clang-tools-extra documentation to the CMake build. Added: clang-tools-extra/trunk/docs/CMakeLists.txt clang-tools-extra/trunk/docs/doxygen.cfg.in c

[clang-tools-extra] r258926 - [clang-tidy] Fix documentation.

2016-01-27 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Jan 27 05:37:19 2016 New Revision: 258926 URL: http://llvm.org/viewvc/llvm-project?rev=258926&view=rev Log: [clang-tidy] Fix documentation. Fixed broken links to cppcoreguidelines (anchors specified in the .md file should be used, not automatic anchors generated by github

Re: [PATCH] D16529: [clang-tidy] Add modernize-raw-string-literal check

2016-01-27 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:27 @@ +26,3 @@ + // we only transform ASCII string literals + if (!Literal->isAscii()) +return false; Why can't the check convert non-ascii string literals to correspond

Re: [PATCH] D16529: [clang-tidy] Add modernize-raw-string-literal check

2016-01-27 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:27 @@ +26,3 @@ + // we only transform ASCII string literals + if (!Literal->isAscii()) +return false; LegalizeAdulthood wrote: > alexfh wrote: > > Why can't the check co

Re: [clang-tools-extra] r258926 - [clang-tidy] Fix documentation.

2016-01-27 Thread Alexander Kornienko via cfe-commits
Thanks! On Wed, Jan 27, 2016 at 7:30 PM, Hans Wennborg wrote: > On Wed, Jan 27, 2016 at 3:37 AM, Alexander Kornienko via cfe-commits > wrote: > > Author: alexfh > > Date: Wed Jan 27 05:37:19 2016 > > New Revision: 258926 > > > > URL: http://llvm.org/vie

Re: [PATCH] D16721: [clang-tidy] Move implicit-cast-in-loop check to upstream.

2016-01-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 one nit. I'll fix and commit the patch. Thank you! Comment at: clang-tidy/performance/ImplicitCastInLoopCheck.cpp:79 @@ +78,3 @@ + // code at the end). + if

Re: [PATCH] D16721: [clang-tidy] Move implicit-cast-in-loop check to upstream.

2016-01-29 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/performance_implicit_cast_in_loop.cpp:1 @@ +1,2 @@ +// RUN: %check_clang_tidy %s performance-implicit-cast-in-loop %t + Also, the name should use dashes, not underscores. I'll fix this as well. Repository

Re: [PATCH] D16587: Fixed function params comparison. Updated docs and tests.

2016-01-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! I'll commit the patch for you. http://reviews.llvm.org/D16587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[clang-tools-extra] r259195 - [clang-tidy] Move implicit-cast-in-loop check to upstream.

2016-01-29 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jan 29 09:21:32 2016 New Revision: 259195 URL: http://llvm.org/viewvc/llvm-project?rev=259195&view=rev Log: [clang-tidy] Move implicit-cast-in-loop check to upstream. Summary: This is implemented originally by Alex Pilkiewicz (pi...@google.com). Reviewers: alexfh Subscr

[clang-tools-extra] r259197 - Fixed function params comparison. Updated docs and tests.

2016-01-29 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jan 29 09:22:10 2016 New Revision: 259197 URL: http://llvm.org/viewvc/llvm-project?rev=259197&view=rev Log: Fixed function params comparison. Updated docs and tests. Summary: "checkParamTypes" may fail if the the type of some parameter is not canonical. Fixed it by compa

Re: [PATCH] D16587: Fixed function params comparison. Updated docs and tests.

2016-01-29 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL259197: Fixed function params comparison. Updated docs and tests. (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D16587?vs=46360&id=46382#toc Repository: rL LLVM http://revie

Re: [PATCH] D16721: [clang-tidy] Move implicit-cast-in-loop check to upstream.

2016-01-29 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL259195: [clang-tidy] Move implicit-cast-in-loop check to upstream. (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D16721?vs=46377&id=46381#toc Repository: rL LLVM http://revi

[clang-tools-extra] r259198 - [clang-tidy] Fix minor style issues. NFC

2016-01-29 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jan 29 09:22:20 2016 New Revision: 259198 URL: http://llvm.org/viewvc/llvm-project?rev=259198&view=rev Log: [clang-tidy] Fix minor style issues. NFC Modified: clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp clang-tools-extra/trunk/clang-tidy/perfo

[clang-tools-extra] r259196 - [clang-tidy] Fix style issues. NFC

2016-01-29 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jan 29 09:21:43 2016 New Revision: 259196 URL: http://llvm.org/viewvc/llvm-project?rev=259196&view=rev Log: [clang-tidy] Fix style issues. NFC Added: clang-tools-extra/trunk/test/clang-tidy/performance-implicit-cast-in-loop.cpp - copied, changed from r259195,

[clang-tools-extra] r259199 - [clang-tidy] ForRangeCopyCheck that warns on and fixes unnecessary copies of loop variables.

2016-01-29 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jan 29 09:54:26 2016 New Revision: 259199 URL: http://llvm.org/viewvc/llvm-project?rev=259199&view=rev Log: [clang-tidy] ForRangeCopyCheck that warns on and fixes unnecessary copies of loop variables. Patch by Felix Berger! Differential revision: http://reviews.llvm.org

[clang-tools-extra] r259214 - [clang-tidy] Don't use delegating constructors, since they are not supported by MSVC 2013

2016-01-29 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jan 29 11:35:53 2016 New Revision: 259214 URL: http://llvm.org/viewvc/llvm-project?rev=259214&view=rev Log: [clang-tidy] Don't use delegating constructors, since they are not supported by MSVC 2013 Modified: clang-tools-extra/trunk/clang-tidy/performance/ImplicitCast

Re: [PATCH] D16529: [clang-tidy] Add modernize-raw-string-literal check

2016-01-31 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for addressing (most of) the comments! I have a few more comments and the comment about the implementation of `asRawStringLiteral` still applies. Also, please remove unrelated files from the patch. Comment at: clang-tidy/modernize/RawStringLi

Re: [PATCH] D16529: [clang-tidy] Add modernize-raw-string-literal check

2016-01-31 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D16529#340240, @alexfh wrote: > Also, please remove unrelated files from the patch. Please ignore this part, I missed the new diff. http://reviews.llvm.org/D16529 ___ cfe-commits mailing list cfe

Re: [PATCH] D14619: [PATCH] clang-tidy checker for nothrow copy constructible exception objects

2015-11-12 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/cert/ThrownExceptionTypeCheck.cpp:36 @@ +35,3 @@ + bool Diag = false; + for (const auto *Ctor : RD->ctors()) { +if (Ctor->isCopyConstructor()) { I'd slightly prefer this check to be expressed as a matcher:

[clang-tools-extra] r253036 - [clang-tidy] Remove unused #includes.

2015-11-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Nov 13 06:16:10 2015 New Revision: 253036 URL: http://llvm.org/viewvc/llvm-project?rev=253036&view=rev Log: [clang-tidy] Remove unused #includes. Summary: Testing Phab with git-svn Reviewers: alexfh Differential Revision: http://reviews.llvm.org/D14649 Modified: cl

Re: [PATCH] D14619: [PATCH] clang-tidy checker for nothrow copy constructible exception objects

2015-11-13 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Much better now. A few more comments. Comment at: clang-tidy/cert/ThrownExceptionTypeCheck.cpp:18 @@ +17,3 @@ +namespace { +AST_MATCHER(CXXConstructorDecl, isNoThrowCopyConstructible) { + if (!Node.isCopyConstructor()) nit: I suggest cha

Re: [PATCH] D14619: [PATCH] clang-tidy checker for nothrow copy constructible exception objects

2015-11-13 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 one nit. Thank you! Comment at: clang-tidy/cert/ThrownExceptionTypeCheck.cpp:23 @@ +22,3 @@ + if (const auto *FnTy = Node.getType()->getAs()) { +// If any

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

2015-11-16 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:23 @@ +22,3 @@ +} + +void MoveConstantArgumentCheck::check(const MatchFinder::MatchResult &Result) { The problem is that each template class or function can have several repre

[clang-tools-extra] r253203 - [clang-tidy] Test commit (playing with git-svn)

2015-11-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Nov 16 07:06:15 2015 New Revision: 253203 URL: http://llvm.org/viewvc/llvm-project?rev=253203&view=rev Log: [clang-tidy] Test commit (playing with git-svn) Modified: clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp clang-tools-extra/trunk/clang-tidy/ClangTidyDiagn

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

2015-11-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for the update! Looks almost right. A few minor comments. Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:34 @@ +33,3 @@ + const Expr *Arg = CallMove->getArg(0); + auto *Context = Result.Context; + Looks like you're

Re: [PATCH] D14977: clang-tidy: code cleanup with isAssignmentOperator

2015-11-25 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a reviewer: alexfh. alexfh added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D14977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

Re: [PATCH] D14964: [clang-tidy] Fix problem with parallel configure build

2015-11-25 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. LG Do you need me to submit this? Repository: rL LLVM http://reviews.llvm.org/D14964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14582: [clang-tidy] cppcoreguidelines-pro-bounds-pointer-arithmetic: ignore generated pointer arithmetic

2015-11-25 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Sorry for the delay, I was sick and didn't read mail. Looks good with a nit. Thanks for the fix! Comment at: clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp:

Re: [PATCH] D14824: [PATCH] Add clang-tidy check for static or thread_local objects where construction may throw

2015-11-25 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for the delay, I was sick last week. Looks mostly fine. Comment at: clang-tidy/cert/CERTTidyModule.cpp:19 @@ -18,2 +18,3 @@ #include "../misc/ThrowByValueCatchByReferenceCheck.h" +#include "StaticObjectExceptionCheck.h" #include "SetLongJmpCheck.

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

2015-11-25 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Awesome! Thank you for the new check! There are a couple of nits, but I'll fix these before submitting the patch. Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:42

[clang-tools-extra] r254070 - [clang-tidy] Const std::move() argument ClangTidy check

2015-11-25 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Nov 25 09:56:11 2015 New Revision: 254070 URL: http://llvm.org/viewvc/llvm-project?rev=254070&view=rev Log: [clang-tidy] Const std::move() argument ClangTidy check ClangTidy check for finding cases when std::move() is called with const or trivially copyable arguments, tha

<    12   13   14   15   16   17   18   19   >