[PATCH] D29151: [clang-tidy] Add misc-invalidated-iterators check.

2017-02-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D29151#662504, @zaks.anna wrote: > Before clang-tidy came into existence the guidelines were very clear. One > should write a clang warning if the diagnostic: > > - can be implemented without path-insensitive analysis (including >

[PATCH] D28973: Supresses misc-move-constructor-init warning for const fields.

2017-02-08 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294459: [clang-tidy] Supresses misc-move-constructor-init warning for const fields. (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D28973?vs=87484=87655#toc Repository: rL

[PATCH] D26418: [clang-tidy] Add '-suppress-checks-filter' option to suppress diagnostics from certain files

2017-02-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Adding a mechanism to supply suppression lists would be useful as long as it's flexible and extensible enough and doesn't significantly affect performance (especially, when not in use). In particular, it shouldn't be bound to a specific format or a specific way to store

[PATCH] D29726: [Clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members

2017-02-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/readability/DeleteNullPointerCheck.cpp:46 + DeleteExpr, DeleteMemberExpr, +

[PATCH] D28973: Supresses misc-move-constructor-init warning for const fields.

2017-02-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. I'll commit the patch for you. https://reviews.llvm.org/D28973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-06 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. I wonder whether there's a compiler diagnostic for this purpose. Compiler diagnostics are more efficient at reaching users and should be preferred where they are appropriate (this seems like one of such cases). https://reviews.llvm.org/D29267

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-02-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. A couple of nits. Please address Aaron's comment as well. Comment at: clang-tidy/misc/ThrowWithNoexceptCheck.cpp:53 + for (const auto : NoExceptRanges) { +//

[PATCH] D21507: Changes after running check modernize-use-emplace (D20964)

2017-02-02 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. If you're still considering to submit this patch, could you rebase it (or maybe re-generate instead?) and split into easier to digest parts? A couple of things I noticed: 1.

[PATCH] D28973: Supresses misc-move-constructor-init warning for const fields.

2017-01-22 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/test/clang-tidy/misc-move-constructor-init.cpp:88 +struct O { + O(O&& other) : b(other.b) {} // ok + const B b;

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-01-24 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LGTM, if Aaron has no concerns. Thank you for the new check! https://reviews.llvm.org/D20693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D26418: [clang-tidy] Add '-suppress-checks-filter' option to suppress diagnostics from certain files

2017-01-24 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. My apologies again for the delay. There are a few things I'm concerned about: 1. Suppression list being a command-line option is going to be inconvenient to completely useless in many setups. The `-line-filter` option is special in this regard, since it was added for a

[PATCH] D25024: [clang-tidy] Add check for detecting declarations with multiple names

2017-01-24 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. https://reviews.llvm.org/D27621 seems to have a more up-to-date version of this patch. https://reviews.llvm.org/D25024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D26466: [clang-tidy] Fix NOLINT test

2017-01-24 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL292926: [clang-tidy] Fix NOLINT test (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D26466?vs=77378=85571#toc Repository: rL LLVM https://reviews.llvm.org/D26466 Files:

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2017-01-24 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:130 +if (isa(*(FirstVarIt + 1))) + return "typedef " + TypeString; + Should we suggest `using x = ...;` in C++11 code? Comment at:

[PATCH] D30191: [clang-tidy] Reword the "code outside header guard" warning.

2017-02-21 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thank you for the fix! https://reviews.llvm.org/D30191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D21815: [clang-tidy] Add 'included from' details to warning message.

2017-02-21 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Ping ;) Do you have time to finish this? https://reviews.llvm.org/D21815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29806: [clang-tidy] Add -path option to clang-tidy-diff.py

2017-02-17 Thread Alexander Kornienko via Phabricator 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/D29806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29726: [Clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members

2017-02-12 Thread Alexander Kornienko via Phabricator 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/D29726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. A couple of comments. Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:35 + + auto HasConstructExpr = has(ConstructExpr); + Nit: I

[PATCH] D29899: [clang-tidy] Add support for NOLINTNEXTLINE.

2017-02-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Awesome! LG with one nit. Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:300 + // Now skip any newlines. + // FIXME: We want to skip over exactly one line, not an

[PATCH] D29928: [clang-tidy] Improve diagnostic message for misc-definitions-in-header.

2017-02-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thank you! https://reviews.llvm.org/D29928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. A few more nits. Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:66 + auto Diag = diag(Loc, "to avoid repeating the return type from the " +

[PATCH] D29928: [clang-tidy] Improve diagnostic message for misc-definitions-in-header.

2017-02-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:131-135 +if (FD->getTemplateSpecializationKind() != TSK_Undeclared) +

[PATCH] D19586: Misleading Indentation check

2017-02-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Gábor, thank you for picking up this patch and finishing it! https://reviews.llvm.org/D19586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D19586: Misleading Indentation check

2017-02-14 Thread Alexander Kornienko via Phabricator 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/readability/MisleadingIndentationCheck.cpp:79 + Finder->addMatcher( + compoundStmt(anyOf(has(ifStmt()), has(forStmt()), has(whileStmt( +

[PATCH] D29726: [Clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members

2017-02-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: test/clang-tidy/readability-delete-null-pointer.cpp:67 + // CHECK-MESSAGES: :[[@LINE-2]]:7: warning: 'if' statement is unnecessary; deleting

[PATCH] D29957: [clang-tidy] Ignore instantiated functions and static data members of classes in misc-definitions-in-headers.

2017-02-15 Thread Alexander Kornienko via Phabricator 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/D29957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LGTM. Please wait for Aaron as well. Repository: rL LLVM https://reviews.llvm.org/D28768 ___ cfe-commits mailing list

[PATCH] D29839: [clang-tidy] New misc-istream-overflow check

2017-02-12 Thread Alexander Kornienko via Phabricator 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/D29839#674517, @aaron.ballman wrote: > In https://reviews.llvm.org/D29839#674301, @xazax.hun wrote: > > > Shouldn't this be a path sensitive check within

[PATCH] D19586: Misleading Indentation check

2017-02-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:72 +SM.getExpansionColumnNumber(NextLoc)) + diag(NextLoc, "misleading

[PATCH] D29262: Fixes to modernize-use-using

2017-02-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with a few comments. Comment at: clang-tidy/modernize/UseUsingCheck.h:24 class UseUsingCheck : public ClangTidyCheck { + public: nit: empty line

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Please mark all addressed comments "Done". Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:60 + // Make sure that the return type matches the constructed type. + const QualType returnType = +

[PATCH] D29806: [clang-tidy] Add -path option to clang-tidy-diff.py

2017-02-10 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. What's your use case? Can it be addressed by just forwarding the -p flag to clang-tidy? The script shouldn't know anything about implementation details of the compilation database

[PATCH] D29661: [clang-tidy] Add -quiet option to suppress extra output

2017-02-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with one comment. Comment at: clang-tidy/tool/ClangTidyMain.cpp:194 +printing statistics about ignored warnings, +check profile data and warnings treated as +errors if

[PATCH] D30034: [clang-tidy] Fix a false positive for explicit template instantiations in misc-unused-using-decls.

2017-02-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Richard, it seems like the AST could be improved here by adding nodes for the explicit instantiation declarations and definitions or using existing nodes, if there are suitable ones. What do you think? https://reviews.llvm.org/D30034

[PATCH] D30034: [clang-tidy] Fix a false positive for explicit template instantiations in misc-unused-using-decls.

2017-02-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. > it may introduce true positives True positives is all we need from clang-tidy checks ;) I guess, you meant "false negatives" (https://en.wikipedia.org/wiki/False_positives_and_false_negatives). The main question here is whether we should extend the AST instead of

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-02-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/ThrowWithNoexceptCheck.cpp:54 +// FIXME use DiagnosticIDs::Level::Note +diag(NoExceptRange.getBegin(), "in a function declared no-throw here:", DiagnosticIDs::Note) +<<

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-01-24 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: test/clang-tidy/modernize-return-braced-init-list.cpp:150 +template +T f16() { + return T(); "With multiple instantiations" is

[PATCH] D28667: [clang-tidy] Don't modernize-raw-string-literal if replacement is longer.

2017-01-24 Thread Alexander Kornienko via Phabricator 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/D28667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-01-24 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/modernize/UseNoexceptCheck.cpp:20-33 +static StringRef +makeDynamicExceptionString(const SourceManager , +

[PATCH] D29806: [clang-tidy] Add -path option to clang-tidy-diff.py

2017-02-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D29806#673489, @ehsan wrote: > In https://reviews.llvm.org/D29806#673329, @alexfh wrote: > > > What's your use case? Can it be addressed by just forwarding the -p flag to > > clang-tidy? > > > I just need to pass the full path to the

[PATCH] D30002: [clang-tidy] Fix handling of methods with try-statement as a body in modernize-use-override

2017-02-17 Thread Alexander Kornienko via Phabricator 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/D30002 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-01-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: test/clang-tidy/modernize-return-braced-init-list.cpp:132 +auto v1 = []() { return vector({1, 2}); }(); +auto v2 = []() -> vector { return

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-01-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/misc/ThrowWithNoexceptCheck.cpp:44 +} else { + /* If a single one is not valid, we cannot apply the fix as we need to + *

[PATCH] D28667: [clang-tidy] Don't modernize-raw-string-literal if replacement is longer.

2017-01-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/modernize-raw-string-literal.cpp:94 +char const *const Concatenated("\"foo\"" + "\"bar\""); leanil wrote: > alexfh wrote: > > Does this test fail without the patch? Also,

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2017-01-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. A few more comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:153 + const SourceRange FVLoc(DeclStmt->getLocStart(), Location); +

[PATCH] D28729: [clang-tidy] Add -enable-alpha-checks command

2017-01-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D28729#647250, @Prazek wrote: > Does solution like this works for you? We don't officially support alpha > checkers, but it is much easier to check if something is already implemented > in static analyzer easily Is it the only problem

[PATCH] D30412: [clang-tidy] Fix a false positive on modernize-use-nullptr check.

2017-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thanks for tracking this down! https://reviews.llvm.org/D30412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29858: [clang-tidy] Catch trivially true statements like a != 1 || a != 3

2017-03-02 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG unless Etienne has any concerns. https://reviews.llvm.org/D29858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30002: [clang-tidy] Fix handling of methods with try-statement as a body in modernize-use-override

2017-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296598: [clang-tidy] Fix handling of methods with try-statement as a body in modernize… (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D30002?vs=88582=90136#toc Repository:

[PATCH] D16183: Added CheckName field to YAML report

2017-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. This patch is superseded by https://reviews.llvm.org/D26137. https://reviews.llvm.org/D16183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2016-11-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. I'll try to get back to this code review soon. Sorry for the delay. Repository: rL LLVM https://reviews.llvm.org/D26137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-11-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:173-177 +/// Matches the type that was substituted for the template parameter. +AST_MATCHER_P(SubstTemplateTypeParmType, hasReplacementType, + ast_matchers::internal::Matcher,

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-11-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(), +unless(hasAncestor(stmt(anyOf( +forStmt(), cxxForRangeStmt(), whileStmt(),

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2016-12-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. The patch spans two repos, so I couldn't apply it using arcanist. Just made it "manually" (patch -p0 -i ...); now running tests... Repository: rL LLVM https://reviews.llvm.org/D26137 ___ cfe-commits mailing list

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2016-12-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Looks like compiler has found a couple of bugs: In file included from llvm.git/tools/clang/tools/extra/clang-tidy/ClangTidy.cpp:38:

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2016-12-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Have you run the tests? I see a number of failures: $ ninja check-clang-tools ... Failing Tests (6): Clang Tools :: clang-apply-replacements/basic.cpp Clang Tools :: clang-apply-replacements/conflict.cpp Clang Tools ::

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. One important thing is missing. Please run this check on a large enough codebase (LLVM + Clang is a good choice for testing most of kinds of checks usually) and include a summary of

[PATCH] D27748: [clang-tidy] Suggest including if necessary in type-promotion-in-math-fn-check.

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp:187 - diag(Call->getExprLoc(), "call to '%0' promotes float to double") - <<

[PATCH] D27748: [clang-tidy] Suggest including if necessary in type-promotion-in-math-fn-check.

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. LG with a couple of nits. https://reviews.llvm.org/D27748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27813: [clang-tidy] fix missing anchor for MPI Module

2016-12-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. LG, thank you! https://reviews.llvm.org/D27813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-12-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Thanks, this is fine to commit. https://reviews.llvm.org/D27187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/readability/DeleteNullPointerCheck.cpp:52 + + auto D = diag( + IfWithDelete->getLocStart(), Rename `D` to `Diag`,

[PATCH] D27700: [clang-tidy] refactor ExprSequence out of misc-use-after-move check

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/utils/ExprSequence.cpp:154 +return SyntheticStmtSourceMap.lookup(S); + else +return S; Prazek wrote: > alexfh wrote: > > nit: No `else` after return, please. > Not sure if he should change it in this

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

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/misc/StringCompareCheck.cpp:48 +diag(Matched->getLocStart(), + "do not use compare to test equality of strings; " +

[PATCH] D22507: Clang-tidy - Enum misuse check

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. LG with one nit. Feel free to ping earlier next time. Comment at: clang-tidy/misc/SuspiciousEnumUsageCheck.cpp:170-171 + if (const auto *EnumExpr = Result.Nodes.getNodeAs("enumExpr")) { +if (!StrictMode) + return; +const auto *EnumDec =

[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with one nit. Comment at: clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp:145-153 + bool StdFnRequresCpp11 = +

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Hit "submit" too early. LG, but please wait until Malcolm is happy with the change as well. Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D22507: Clang-tidy - Enum misuse check

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/SuspiciousEnumUsageCheck.cpp:155 + +if (EnumDec->enumerator_begin() == EnumDec->enumerator_end() || +OtherEnumDec->enumerator_begin() == OtherEnumDec->enumerator_end()) szepet wrote: > alexfh

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG, but please wait until Malcolm > Whats not nice is, that there is no underlining (in test neither), but i > could not find out what is wrong, > since i supply a SourceRange in the

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Committed in r289546. Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp:21 + +static StringRef getValueInit(const CXXCtorInitializer *Init) { + switch (Init->getInit()->getType()->getScalarTypeKind()) { The function name doesn't make it

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG modulo comment. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(), +

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Jonas, do you need someone to commit the patch for you? Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/cppcoreguidelines/NoMallocCheck.cpp:54 + +void NoMallocCheck::handleAquisition(const CallExpr *AquisitionCall) { +

[PATCH] D28334: [clang-tidy] Add -extra-arg and -extra-arg-before to run-clang-tidy.py

2017-01-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/tool/run-clang-tidy.py:80 + for arg in extra_arg: + start.append('-extra-arg=%s' % arg[0]) + for arg in extra_arg_before: Why arg[0] and not just arg? https://reviews.llvm.org/D28334

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-01-10 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/modernize/UseNoexceptCheck.cpp:99 + + assert(CRange.isValid() && "Exception Specification Range is invalid."); + assert(FnTy &&

[PATCH] D27700: [clang-tidy] refactor ExprSequence out of misc-use-after-move check

2017-01-11 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. One late comment. Comment at: clang-tools-extra/trunk/clang-tidy/utils/ExprSequence.cpp:154-155 +const Stmt *ExprSequence::resolveSyntheticStmt(const Stmt *S) const { + if (SyntheticStmtSourceMap.count(S)) +return SyntheticStmtSourceMap.lookup(S);

[PATCH] D26015: Correctly classify main file includes if there is a prefix added

2017-01-12 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291767: Correctly classify main file includes if there is a prefix added (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D26015?vs=84001=84121#toc Repository: rL LLVM

[PATCH] D26015: Correctly classify main file includes if there is a prefix added

2017-01-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. LG, committed as r291767. Repository: rL LLVM https://reviews.llvm.org/D26015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28729: [clang-tidy] Add -enable-alpha-checks command

2017-01-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. As discussed with the Static Analyzer maintainers, alpha checkers are completely unsupported and are suitable for very early testing only. We had problems with them routinely,

[PATCH] D26015: Correctly classify main file includes if there is a prefix added

2017-01-11 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thank you for the fix! https://reviews.llvm.org/D26015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D26015: Correctly classify main file includes if there is a prefix added

2017-01-11 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Tests don't pass with this patch applied: $ ninja check-clang-tools [22/23] Running the Clang extra tools' regression tests FAIL: Extra Tools Unit Tests ::

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

2016-12-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/misc/StringCompareCheck.cpp:29 + + // First and second case: cast str.compare(str) to boolean + Finder->addMatcher(

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

2016-12-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:58 "modernize-use-bool-literals"); -CheckFactories.registerCheck("modernize-use-default"); + CheckFactories.registerCheck("modernize-use-equals-default");

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2016-12-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Do you have commit access? If you need me to commit the patch for you, please rebase it on top of HEAD. Repository: rL LLVM https://reviews.llvm.org/D26137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27248: [clang-tidy] Do not trigger unnecessary-value-param check on methods marked as final

2016-12-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG. Looks like a strict improvement. https://reviews.llvm.org/D27248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-12-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:58 "modernize-use-bool-literals"); -CheckFactories.registerCheck("modernize-use-default"); + CheckFactories.registerCheck("modernize-use-equals-default");

[PATCH] D26418: [clang-tidy] Add '-suppress-checks-filter' option to suppress diagnostics from certain files

2016-12-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Sorry for the delay. I'll try to get back to this patch soon. https://reviews.llvm.org/D26418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2016-12-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with a comment. Comment at: include/clang/Tooling/DiagnosticsYaml.h:79 + for (auto : Doc.Diagnostics) { +if (Diagnostic.Fix.size() > 0) { +

[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Thank you for the new check! A few comments. Comment at: clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp:22 +AST_MATCHER_P(Type,

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

2016-12-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:58 "modernize-use-bool-literals"); -CheckFactories.registerCheck("modernize-use-default"); + CheckFactories.registerCheck("modernize-use-equals-default");

[PATCH] D27142: [clang-tidy] Make format style customizable

2016-11-30 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thanks! Repository: rL LLVM https://reviews.llvm.org/D27142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2016-11-30 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Looks mostly good. A few more nits. Comment at: include/clang/Tooling/Core/Diagnostic.h:68-71 + /// A freeform chunk of text to describe the context of the

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

2016-12-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thanks! https://reviews.llvm.org/D26511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp:62-67 + Finder->addMatcher( +

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-11-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(), +unless(hasAncestor(stmt(anyOf( +forStmt(), cxxForRangeStmt(), whileStmt(),

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

2016-12-30 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. I've noticed a few more minor issues. Otherwise looks good. Thank you for the new check! Comment at: clang-tidy/readability/DeleteNullPointerCheck.cpp:27-38 + const auto

[PATCH] D28022: [clang-tidy] Handle constructors in performance-unnecessary-value-param

2016-12-30 Thread Alexander Kornienko via Phabricator 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/D28022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2017-01-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good. Fixed the issues myself and running tests before committing this. Thank you for working on this! Comment at: tools/extra/clang-tidy/ClangTidy.cpp:106 void

  1   2   3   4   5   6   7   8   9   10   >