Re: [PATCH] D14540: clang-tidy: Fix FP in MacroParenthesesChecker when using object member pointer

2015-11-10 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. Thank you for the fix! http://reviews.llvm.org/D14540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

Re: [PATCH] D14517: Fix bug 25362 "cppcoreguidelines-pro-bounds-array-to-pointer-decay does not consider const"

2015-11-10 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. Thank you for the fix! Comment at: clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp:33 @@ +32,3 @@ + ast_

Re: [PATCH] D13746: [clang-tidy] add check cppcoreguidelines-pro-bounds-constant-array-index

2015-11-11 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for the delay. A few more comments. Comment at: clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp:86 @@ +85,3 @@ + if (!IndexExpr->isIntegerConstantExpr(Index, *Result.Context, nullptr, +true)

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

2015-11-12 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. It may be more effective to filter out expressions that operate on implicit variables, e.g. by adding this constraint to the binaryOperator matcher: unless(hasLHS(ignoringImpCasts(declRefExpr(to(isImplicit()) (maybe also for RHS). The benefit of this would be that

Re: [PATCH] D14517: Fix bug 25362 "cppcoreguidelines-pro-bounds-array-to-pointer-decay does not consider const"

2015-11-12 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Still LG. http://reviews.llvm.org/D14517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D13746: [clang-tidy] add check cppcoreguidelines-pro-bounds-constant-array-index

2015-11-12 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 comment. Thank you! Comment at: clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp:107 @@ +106,3 @@ +diag(Matched->getExprLoc(), +

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-06 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:178 @@ +177,3 @@ +if (NamingStyles[Typedef].isSet()) { + KindName = "typedef"; + Style = NamingStyles[Typedef]; berenm wrote: > alexfh wrote: > > berenm wrote:

Re: [PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

2016-07-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thanks for addressing the comments. The code looks better now. My main concern at this point is that the name and the location of the check: "misc" is a place for the stuff we can't find a better place for, but here I guess we clearly want a separate module and a subdire

Re: [PATCH] D22381: cppcoreguidelines-pro-bounds-constant-array-index: ignore implicit constructor

2016-07-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 https://reviews.llvm.org/D22381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

Re: [PATCH] D22069: clang-tidy modernize-loop-convert: preserve type of alias declaration (bug 28341)

2016-07-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 Comment at: test/clang-tidy/modernize-loop-convert-extra.cpp:1070 @@ +1069,3 @@ + // CHECK-FIXES: for(unsigned char value : v) + // CHECK-FIXES-NOT: unsigned char value =

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-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 with a nit. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:86 @@ +85,3 @@ + "slicing object from type %0 to %1 discards override %2") + << &De

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

2016-07-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A few more nits. Comment at: clang-tidy/performance/InefficientStringConcatenationCheck.cpp:50 @@ +49,3 @@ + hasOverloadedOperatorName("="), + hasArgument(0, allOf(declRefExpr(BasicStringType), + declRefExpr(hasDeclarat

Re: [PATCH] D19586: Misleading Indentation check

2016-07-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Please mark all addressed comments "Done". Comment at: test/clang-tidy/readability-misleading-indentation.cpp:15 @@ +14,3 @@ + foo2(); // comment + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: wrong indentation, 'else' belongs to 'if(con

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-07-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Please update the tests according to the comment (https://reviews.llvm.org/D17990?id=62701#inline-186216). Comment at: docs/clang-tidy/checks/modernize-deprecated-headers.rst:43 @@ -44,2 +42,3 @@ headers deprecated before C++11, otherwise -- every heade

Re: [PATCH] D21472: [clang-tidy] readability-identifier-naming - support for other case types

2016-07-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 https://reviews.llvm.org/D21472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-07-19 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/modernize/DeprecatedHeadersCheck.cpp:39 @@ -37,2 +38,3 @@ llvm::StringMap CStyledHeaderToCxx; + std::set DeleteHeader; }; nit: DeleteHeaders

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

2016-07-19 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:31 @@ +30,3 @@ + +const std::string DefaultContainersWithPushBack = +"::std::vector; ::std::list; ::std::deque"; A st

Re: [PATCH] D19577: [clang-tidy] Enhance misc-suspicious-string-compare by matching string.compare

2016-07-19 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. In https://reviews.llvm.org/D19577#413888, @etienneb wrote: > In https://reviews.llvm.org/D19577#413526, @alexfh wrote: > > > I'm somewhat reluctant to add LLVM-specific checks to mis

Re: [PATCH] D21303: [clang-tidy] Adds performance-returning-type check.

2016-07-19 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. removing from my dashboard, while the check is waiting for Richard's comments. https://reviews.llvm.org/D21303 ___ cfe-commits mailing

Re: [PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

2016-07-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MpiTypeMismatchCheck.cpp:218 @@ +217,3 @@ + + StringRef TypedefToCompare = Typedef->getDecl()->getQualifiedNameAsString(); + // Check if the typedef is known and not matching the MPI datatype. Alexander_D

Re: [PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

2016-07-21 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/mpi/MPITidyModule.cpp:30 @@ +29,3 @@ +static ClangTidyModuleRegistry::Add X("mpi-module", + "Adds MPI lint checks."

Re: [PATCH] D22605: [Clang-tool-extra] Restructure release notes

2016-07-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 Repository: rL LLVM https://reviews.llvm.org/D22605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

Re: [PATCH] D22656: [Clang-apply-replacements] Remove custom version printing; fix some Include What You Use warnings

2016-07-21 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Full context diffs, please. See http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface Repository: rL LLVM https://reviews.llvm.org/D22656 ___

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

2016-07-21 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:45 @@ -33,3 +44,3 @@ hasDeclaration(functionDecl(hasName("push_back"))), - on(hasType(cxxRecordDecl(hasAnyName("std::vector",

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

2016-07-21 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:45 @@ -33,3 +44,3 @@ hasDeclaration(functionDecl(hasName("push_back"))), - on(hasType(cxxRecordDecl(hasAnyName("std::vector", "llvm::SmallVector", -

Re: [PATCH] D22465: [clang-rename] introduce better symbol finding and add few more tests

2016-07-21 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-rename/USRFinder.cpp:81 @@ +80,3 @@ +const auto TypeEndLoc = Loc.getEndLoc(), + TypeBeginLoc = Lexer::GetBeginningOfToken( + TypeEndLoc,

Re: [PATCH] D22465: [clang-rename] introduce better symbol finding and add few more tests

2016-07-22 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! Comment at: clang-rename/USRFinder.h:49 @@ +48,3 @@ +// FIXME: This wouldn't be needed if +// RecursiveASTVisitor::VisitNestedNameSpecifier would have been implem

Re: [PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

2016-07-22 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D21962#492657, @Alexander_Droste wrote: > Still, the type mismatch is somehow not found/listed by clang-tidy. > When invoking `$LLVM_TRUNK/build/.../clang-tidy -checks='*' -list-checks | > ag mpi` > it does not show up. Something seems to be

Re: [PATCH] D22671: MPI-Checker: move MPIFunctionClassifier.h

2016-07-22 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. Specifically, this header is going to be used in the corresponding clang-tidy check (see the dependent revision). https://reviews.llvm.org/D22671 ___ cfe-commits mailing list cfe-commits@li

Re: [PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

2016-07-22 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A few more nits. Please ensure the tests pass once you get the mpi module linking to the clang-tidy binary. Comment at: docs/clang-tidy/checks/mpi-type-mismatch.rst:4 @@ +3,3 @@ +mpi-type-mismatch +== + Remove extra `

Re: [PATCH] D22656: [Clang-apply-replacements] Remove custom version printing; fix some Include What You Use warnings

2016-07-22 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. In many cases a transitively included header can be considered a part of a public interface of an already included header, e.g. it's reasonable to assume that DiagnosticIDs.h is a pa

Re: [PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

2016-07-23 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 comment. Comment at: clang-tidy/mpi/TypeMismatchCheck.cpp:237 @@ +236,3 @@ +void TypeMismatchCheck::check(const MatchFinder::MatchResult &Result) { + stat

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

2016-07-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D22208#492385, @Prazek wrote: > There is one bug left: > > In the ClangIncludeFixer.cpp:169 there is push back that looks like this > > Symbols.push_back(find_all_symbols::SymbolInfo( > > Split.first.trim(), > find_all_symbols::SymbolInfo::S

Re: [PATCH] D22656: [Clang-apply-replacements] Remove custom version printing; fix some Include What You Use warnings

2016-07-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D22656#493036, @Eugene.Zelenko wrote: > Don't include DiagnosticIDs.h. This header is just an example. I don't want anyone (including myself) manually figure out which of the headers inserted by IWYU actually need to be inserted. I'm also ag

Re: [PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

2016-07-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Do you have commit access? https://reviews.llvm.org/D21962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22656: [Clang-apply-replacements] Remove custom version printing; fix some Include What You Use warnings

2016-07-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. My last comment might come across as somewhat harsh. I didn't mean it to be harsh and just wanted to say that imo, llvm code is not ready to mechanically applying IWYU. Repository: rL LLVM https://reviews.llvm.org/D22656 ___

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-25 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:36 @@ +35,3 @@ +(llvm::Twine("forward<") + TypeParmType->getDecl()->getName() + + llvm::Twine(">")) +.str(); nit: The second `llvm::Twine` i

Re: [clang-tools-extra] r276408 - [clang-tidy] new cppcoreguidelines-slicing

2016-07-25 Thread Alexander Kornienko via cfe-commits
On Fri, Jul 22, 2016 at 2:42 PM, Clement Courbet via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: courbet > Date: Fri Jul 22 07:42:19 2016 > New Revision: 276408 > > URL: http://llvm.org/viewvc/llvm-project?rev=276408&view=rev > Log: > [clang-tidy] new cppcoreguidelines-slicing > > F

r276639 - MPI-Checker: move MPIFunctionClassifier.h

2016-07-25 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Jul 25 10:27:16 2016 New Revision: 276639 URL: http://llvm.org/viewvc/llvm-project?rev=276639&view=rev Log: MPI-Checker: move MPIFunctionClassifier.h Summary: This patch moves the MPIFunctionClassifier header to `clang/include/clang/StaticAnalyzer/Checkers`, in order to

Re: [PATCH] D22671: MPI-Checker: move MPIFunctionClassifier.h

2016-07-25 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL276639: MPI-Checker: move MPIFunctionClassifier.h (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D22671?vs=65050&id=65348#toc Repository: rL LLVM https://reviews.llvm.org/D

[clang-tools-extra] r276641 - Remove trailing spaces.

2016-07-25 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Jul 25 10:43:22 2016 New Revision: 276641 URL: http://llvm.org/viewvc/llvm-project?rev=276641&view=rev Log: Remove trailing spaces. Modified: clang-tools-extra/trunk/test/clang-tidy/mpi-type-mismatch.cpp Modified: clang-tools-extra/trunk/test/clang-tidy/mpi-type-mism

[clang-tools-extra] r276640 - MPITypeMismatchCheck for Clang-Tidy

2016-07-25 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Jul 25 10:43:14 2016 New Revision: 276640 URL: http://llvm.org/viewvc/llvm-project?rev=276640&view=rev Log: MPITypeMismatchCheck for Clang-Tidy Summary: This check verifies if buffer type and MPI (Message Passing Interface) datatype pairs match. All MPI datatypes defined

Re: [PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

2016-07-25 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL276640: MPITypeMismatchCheck for Clang-Tidy (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D21962?vs=65222&id=65351#toc Repository: rL LLVM https://reviews.llvm.org/D21962

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

2016-07-25 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:115 @@ -95,1 +114,3 @@ + auto CtorCallSourceRange = CharSourceRange::getTokenRange( + InnerCtorCall->getExprLoc()

[clang-tools-extra] r276651 - Revert "MPITypeMismatchCheck for Clang-Tidy"

2016-07-25 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Jul 25 12:08:18 2016 New Revision: 276651 URL: http://llvm.org/viewvc/llvm-project?rev=276651&view=rev Log: Revert "MPITypeMismatchCheck for Clang-Tidy" This reverts commit r276640. Breaks multiple buildbots. Removed: clang-tools-extra/trunk/clang-tidy/mpi/CMakeLists

[clang-tools-extra] r276650 - Revert "Remove trailing spaces."

2016-07-25 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Jul 25 12:08:10 2016 New Revision: 276650 URL: http://llvm.org/viewvc/llvm-project?rev=276650&view=rev Log: Revert "Remove trailing spaces." This reverts commit r276641. Breaks multiple buildbots. Modified: clang-tools-extra/trunk/test/clang-tidy/mpi-type-mismatch.cp

Re: [PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

2016-07-25 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Alexander, FYI, the patch has been reverted, since it breaks multiple buildbots, e.g. - http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15/builds/13909/steps/ninja%20check%201/logs/FAIL%3A%20Clang%20Tools%3A%3Ampi-type-mismatch.cpp - http://lab.llvm.org:8011/builde

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

2016-07-25 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A couple of nits. Comment at: clang-tidy/performance/InefficientStringConcatenationCheck.cpp:51 @@ +50,3 @@ + hasArgument( + 0, declRefExpr(BasicStringType), + declRefExpr(hasDeclaration(decl().bind("lhsStrT"))).bind("lhsStr")), ---

Re: [PATCH] D22854: change Vim key binding for include-fixer and clang-rename

2016-07-27 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/include-fixer.rst:73 @@ +72,3 @@ +[`` key``](http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_3)#Map_leader) +is a reference to a specific key defined by the mapleader variable and is binded +to backslash by default. -

Re: [PATCH] D22513: [clang-tidy] add check cppcoreguidelines-special-member-functions

2016-08-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thanks for the new check! Looks awesome! A couple of late comments inline. Comment at: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:91 @@ +90,3 @@ + + std::initializer_list> + Matchers = {{"dtor", SpecialMemb

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

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

Re: [PATCH] D23006: [clang-rename] add basic Emacs integration

2016-08-01 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-rename/tool/clang-rename.el:18 @@ +17,3 @@ + +(defun clang-rename-upstream (new-name) + "Rename all instances of the symbol at the point using clang-rename" The name should be just "clang-rename".

Re: [PATCH] D22803: [clang-tidy] Fix an unused-using-decl false positive about template arguments infunction call expression.

2016-08-01 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D22803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

Re: [PATCH] D23009: [clang-rename] handle overridden functions correctly

2016-08-01 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: test/clang-rename/FunctionOverride.cpp:3 @@ +2,3 @@ + +class A { virtual void foo(); };// CHECK: class A { virtual void boo(); }; +class B : public A { void foo(); }; // CHECK

Re: [clang-tools-extra] r276836 - test: simplify commands, NFC

2016-08-01 Thread Alexander Kornienko via cfe-commits
On Wed, Jul 27, 2016 at 6:43 AM, Saleem Abdulrasool via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: compnerd > Date: Tue Jul 26 23:43:15 2016 > New Revision: 276836 > > URL: http://llvm.org/viewvc/llvm-project?rev=276836&view=rev > Log: > test: simplify commands, NFC > > Rather than

Re: [PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-01 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. Comment at: include/clang/ASTMatchers/ASTMatchers.h:2440 @@ +2439,3 @@ + + return (UnderlyingDecl != nullptr && + InnerMatcher.matches(*UnderlyingDecl, Finder, Builder)); nit: Parentheses are superfluous here.

Re: [PATCH] D23009: [clang-rename] handle overridden functions correctly

2016-08-01 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D23009 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

Re: [PATCH] D22853: [clang-rename] add support for template parameter renaming

2016-08-01 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-rename/USRFinder.cpp:80 @@ -79,1 +79,3 @@ TypeBeginLoc, 0, Context.getSourceManager(), Context.getLangOpts()); +if (const auto *TemplateTypeParm = dyn_cast(Loc

Re: [PATCH] D23006: [clang-rename] add basic Emacs integration

2016-08-01 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-rename/tool/clang-rename.el:28 @@ +27,3 @@ +(orig-buf (current-buffer)) +(file-name (buffer-file-name))) + For posterity, please add a short summary of the offline discussion. Commen

Re: [PATCH] D23006: [clang-rename] add basic Emacs integration

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

Re: [PATCH] D22853: [clang-rename] add support for template parameter renaming

2016-08-02 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Comment at: clang-rename/USRFinder.cpp:80 @@ -79,1 +79,3 @@ TypeBeginLoc, 0, Context.getSourceManager(), Context.getLangOpts()); +if (const auto *TemplateTypeP

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

2016-08-02 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Please add revision number (this can be automated, if include differential revision URL in your commit message as described in http://llvm.org/docs/Phabricator.html#committing-a-change). https://reviews.llvm.org/D22208 ___

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

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

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

2016-08-02 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Sorry for the delay. I almost missed that there was an update to the patch. Please mark addressed comments as "Done". This way it's easier for me to track changes and it's easier for

Re: [PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

2016-08-02 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Running tests, will submit shortly. Comment at: docs/clang-tidy/checks/mpi-type-mismatch.rst:13 @@ +12,3 @@ +.. code:: c++ + // In this case, the buffer type matches MPI datatype. + char buf; This doesn't parse - an extra newline is nee

Re: [PATCH] D23058: [clang-rename] add support for template instantiations

2016-08-02 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: test/clang-rename/TemplateClassInstantiationFindByDeclaration.cpp:2 @@ -1,3 +1,3 @@ // RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=287 -new-name=Bar %t.cpp -i -- +// RUN:

Re: [PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

2016-08-02 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL277516: [clang-tidy] MPITypeMismatchCheck (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D21962?vs=65404&id=66544#toc Repository: rL LLVM https://reviews.llvm.org/D21962 Fi

[clang-tools-extra] r277517 - [docs] Fix links format.

2016-08-02 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Aug 2 15:29:47 2016 New Revision: 277517 URL: http://llvm.org/viewvc/llvm-project?rev=277517&view=rev Log: [docs] Fix links format. Modified: clang-tools-extra/trunk/docs/clang-rename.rst clang-tools-extra/trunk/docs/include-fixer.rst Modified: clang-tools-extra

[clang-tools-extra] r277516 - [clang-tidy] MPITypeMismatchCheck

2016-08-02 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Aug 2 15:29:35 2016 New Revision: 277516 URL: http://llvm.org/viewvc/llvm-project?rev=277516&view=rev Log: [clang-tidy] MPITypeMismatchCheck This check verifies if buffer type and MPI (Message Passing Interface) datatype pairs match. All MPI datatypes defined by the MPI

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

2016-08-02 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. Thank you for working on this! Do you need me to commit the patch for you? https://reviews.llvm.org/D20196 ___ cfe-commits mailing l

Re: [PATCH] D22853: [clang-rename] add support for template parameter renaming

2016-08-02 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D22853#503303, @chapuni wrote: > Seems a couple of tests would be incompatible to -fdelayed-template-parsing. > Appeased in r277452. Thank you! And sorry for the inconvenience. Repository: rL LLVM https://reviews.llvm.org/D22853 _

Re: [PATCH] D23058: [clang-rename] improve USRFindingAction

2016-08-03 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: test/clang-rename/TemplateClassInstantiationFindByDeclaration.cpp:2 @@ -1,3 +1,3 @@ // RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=287 -new-name=Bar %t.cpp -i -- +// RUN: clang-rename -offset=159 -new-name=Bar %t.cpp -i -- // RUN:

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

2016-08-03 Thread Alexander Kornienko via cfe-commits
alexfh created this revision. alexfh added a reviewer: hokein. alexfh added a subscriber: cfe-commits. The misc-argument-comment check now ignores leading and trailing underscores and case. The new `StrictMode` local/global option can be used to switch back to strict checking. Add getLocalOrGloba

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

2016-08-03 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Do we want to merge this check with google/GlobalNamesInHeadersCheck.cpp that targets a similar set of issues? Repository: rL LLVM https://reviews.llvm.org/D23130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

Re: [PATCH] D23058: [clang-rename] improve USRFindingAction

2016-08-03 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D23058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

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

2016-08-03 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D23130#505242, @bkramer wrote: > DefinitionsInHeaders is tackling a different problem. IMO > DefinitionsInHeaders is something that should be on by default everywhere, > while this check for definitions in the global namespace is more of a cod

[clang-tools-extra] r277677 - [clang-tidy] Inefficient string operation

2016-08-03 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Aug 3 18:06:03 2016 New Revision: 277677 URL: http://llvm.org/viewvc/llvm-project?rev=277677&view=rev Log: [clang-tidy] Inefficient string operation Patch by Bittner Barni! Differential revision: https://reviews.llvm.org/D20196 Added: clang-tools-extra/trunk/clang

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

2016-08-03 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL277677: [clang-tidy] Inefficient string operation (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D20196?vs=66492&id=66730#toc Repository: rL LLVM https://reviews.llvm.org/D2

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

2016-08-04 Thread Alexander Kornienko via cfe-commits
alexfh marked an inline comment as done. Comment at: clang-tidy/misc/ArgumentCommentCheck.cpp:124 @@ +123,3 @@ + InDecl = InDecl.trim('_'); + return InComment.compare_lower(InDecl) == 0; +} aaron.ballman wrote: > I think this is going to do the wrong thing for n

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

2016-08-04 Thread Alexander Kornienko via cfe-commits
alexfh updated this revision to Diff 66796. alexfh marked 2 inline comments as done. alexfh added a comment. - Documented the StrictMode option, added a couple of consts. https://reviews.llvm.org/D23135 Files: clang-tidy/ClangTidy.h clang-tidy/misc/ArgumentCommentCheck.cpp clang-tidy/misc

Re: [PATCH] D23158: [clang-rename] merge tests when possible

2016-08-04 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Awesome! A few improvements are still possible though. See inline comments. Comment at: test/clang-rename/ClassAsTemplateArgument.cpp:15 @@ +14,3 @@ + +// RUN: cat %s > %t_0.cpp +// RUN: clang-rename -offset=7 -new-name=Bar %t_0.cpp -i --

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

2016-08-04 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Could you run the check on LLVM and post a summary of results? Comment at: clang-tidy/google/GlobalNamesCheck.cpp:90 @@ +89,3 @@ +// extern "C" globals need to be in the global namespace. +if (VDecl->isExternC()) + return; Is

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

2016-08-04 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/ArgumentCommentCheck.cpp:124 @@ +123,3 @@ + InDecl = InDecl.trim('_'); + return InComment.compare_lower(InDecl) == 0; +} aaron.ballman wrote: > Correct, which means this won't behave properly in some loca

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

2016-08-04 Thread Alexander Kornienko via cfe-commits
alexfh updated this revision to Diff 66806. alexfh added a comment. - Added a FIXME. https://reviews.llvm.org/D23135 Files: clang-tidy/ClangTidy.h clang-tidy/misc/ArgumentCommentCheck.cpp clang-tidy/misc/ArgumentCommentCheck.h docs/clang-tidy/checks/misc-argument-comment.rst test/clan

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

2016-08-04 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/ArgumentCommentCheck.cpp:124 @@ +123,3 @@ + InDecl = InDecl.trim('_'); + return InComment.compare_lower(InDecl) == 0; +} aaron.ballman wrote: > alexfh wrote: > > aaron.ballman wrote: > > > Correct, which

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

2016-08-04 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. hokein: I'm committing the patch; if you have more comments, I'm happy to address them in a follow-up. https://reviews.llvm.org/D23135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[clang-tools-extra] r277729 - [clang-tidy] misc-argument-comment non-strict mode

2016-08-04 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Aug 4 09:54:54 2016 New Revision: 277729 URL: http://llvm.org/viewvc/llvm-project?rev=277729&view=rev Log: [clang-tidy] misc-argument-comment non-strict mode Summary: The misc-argument-comment check now ignores leading and trailing underscores and case. The new `StrictMo

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

2016-08-04 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL277729: [clang-tidy] misc-argument-comment non-strict mode (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D23135?vs=66806&id=66807#toc Repository: rL LLVM https://reviews.ll

Re: [PATCH] D23158: [clang-rename] merge tests when possible

2016-08-04 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Much better now, please also add instruction on how to find offsets. https://reviews.llvm.org/D23158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-04 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D23004#505854, @mboehme wrote: > I assume this means I should avoid doing this (rebasing to a newer revision)? No, rebasing is totally fine. But if some files changed in the meantime, comparing with older revisions will contain unrelated chan

Re: [PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-04 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:2486 @@ +2485,3 @@ + + return (UnderlyingDecl != nullptr && + InnerMatcher.matches(*UnderlyingDecl, Finder, Builder)); mboehme wrote: > I was trying to match the style of t

Re: [PATCH] D21134: clang-tidy: new check readability-misplaced-array-index

2016-08-08 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thanks, that's better. Still a couple of comments. Comment at: clang-tidy/readability/MisplacedArrayIndexCheck.cpp:50 @@ +49,3 @@ + diag(ArraySubscriptE->getLocStart(), + "unusual array index syntax, usually the index is inside the []"); +

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

2016-08-08 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/ClangTidy.cpp:129 @@ -128,22 +128,3 @@ << Message.Message << Name; - for (const tooling::Replacement &Fix : Error.Fix) { -// Retrieve th

Re: [PATCH] D23193: [clang-rename] fix bug with initializer lists

2016-08-08 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Wait, please add a test. https://reviews.llvm.org/D23193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

Re: [PATCH] D23193: [clang-rename] fix bug with initializer lists

2016-08-08 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 nit. Comment at: clang-rename/USRFinder.cpp:100 @@ +99,3 @@ + if (const clang::FieldDecl *FieldDecl = Initializer->getMember()) { +const auto InitBeginL

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

2016-08-08 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/modernize/UseBoolLiteralsCheck.cpp:41 @@ +40,3 @@ + // using anyOf(BINDLITERAL(), anything()). + anyOf(hasTrueExpression(ignoringParenImpCasts( +

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

2016-08-08 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:59 @@ -57,1 +58,3 @@ "modernize-use-bool-literals"); +CheckFactories.registerCheck( +"modernize-use-algorithm");

Re: [PATCH] D23265: [clang-tidy] enhance readability-else-after-return

2016-08-08 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/readability/ElseAfterReturnCheck.cpp:38-40 @@ -34,2 +37,5 @@ SourceLocation ElseLoc = If->getElseLoc(); - DiagnosticBuilder Diag = diag(ElseLoc, "don't use else aft

Re: [PATCH] D21134: clang-tidy: new check readability-misplaced-array-index

2016-08-08 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D21134#508524, @jroelofs wrote: > I think the replacement is wrong for something like: > > int *arr; int offs1, offs2; > offs1[arr + offs2] = 42; > > > which I think would give: > > int *arr; int offs1, offs2; > arr + offs2[offs1] = 42;

Re: [PATCH] D21134: clang-tidy: new check readability-misplaced-array-index

2016-08-08 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/MisplacedArrayIndexCheck.cpp:48 @@ +47,3 @@ + + auto D = + diag(ArraySubscriptE->getLocStart(), aaron.ballman wrote: > Should not use `auto` here because the type is not spelled out in the > i

<    4   5   6   7   8   9   10   11   12   13   >