[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst:29 +- It assumes that the format string is correct for the arguments. If you + get any warnings when compiling with ``-Wformat`` then misbehaviour is + possib

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D149280#4446591 , @mikecrowe wrote: > @Eugene.Zelenko, > I will make the documentation changes you've suggested, but I can't say I > really understand which document elements require single backticks and which > requir

[PATCH] D146922: [clang-tidy] Fix false positve for defaulted move constructor in performance-noexcept-move-constructor

2023-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionSpecAnalyzer.cpp:83 + DefaultableMemberKind Kind) { + auto *RecType = Base.getType()->getAs(); + if (!RecType) Should be `const auto

[PATCH] D146922: [clang-tidy] Fix false positve for defaulted move constructor in performance-noexcept-move-constructor

2023-03-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:260 +- Fixed an issue in :doc:`performance-noexcept-move-constructor + ` which resulted in false Please keep alphabetical order (by check name) in this section. Reposi

[PATCH] D146922: [clang-tidy] Fix false positve for defaulted move constructor in performance-noexcept-move-constructor

2023-03-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:260 +- Fixed an issue in :doc:`performance-noexcept-move-constructor + ` which resulted in false AMS21 wrote: > Eugene.Zelenko wrote: > > Please keep alphabetical order

[PATCH] D147315: [clang-tidy] support unscoped enumerations in readability-static-accessed-through-instance

2023-03-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:264 +- Improved :doc:`readability-static-accessed-through-instance + ` check to Please keep alphabetical order (by check name) in this section. Repository: rG LLVM G

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-03-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/optional-value-conversion.rst:46 +expressions that match the methods. +Default value is `"::value$;::get$`. Unintended quote in value. Repository: rG

[PATCH] D147379: [clang-tidy] Disable misc-definitions-in-headers for declarations in anonymous namespaces

2023-04-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko accepted this revision. Eugene.Zelenko added a comment. This revision is now accepted and ready to land. Looks OK for me, but will be good idea to wait for other reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147379/new/ ht

[PATCH] D147563: [clang-tidy] Deprecate cert-dcl21-cpp

2023-04-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko accepted this revision. Eugene.Zelenko added a comment. This revision is now accepted and ready to land. I think will be good idea to track deprecated features on GitHub issues with something like `deprecate in XYZ` label(s). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D137782: [clang-tidy]bugprone-fold-init-type

2023-04-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please rebase from latest `main`. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:294 +- Improved :doc:`bugprone-fold-init-type + ` to handle iterators that do not Please keep alphabetical order (by check name) in this se

[PATCH] D147876: [clang-tidy] Support introducing checks as a list in the config file

2023-04-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko accepted this revision. Eugene.Zelenko added a comment. This revision is now accepted and ready to land. Looks OK for me but will be good idea to wait for other reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147876/new/ htt

[PATCH] D148340: [clang-tidy] Apply cppcoreguidelines-avoid-capture-default-when-capturin-this only to by-value capture default

2023-04-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidByValueCaptureDefaultWhenCapturingThisCheck.h:1 -//===--- AvoidCaptureDefaultWhenCapturingThisCheck.h - clang-tidy*- C++ -*-===// +//===--- AvoidByValueCaptureDefaultWhenCaptur

[PATCH] D148340: [clang-tidy] Apply cppcoreguidelines-avoid-capture-default-when-capturin-this only to by-value capture default

2023-04-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/MisleadingCaptureDefaultByValueCheck.h:1 +//===--- MisleadingCaptureDefaultByValueCheck.h - clang-tidy*- C++ +//-*-===// Split header comment. Repository: rG LLV

[PATCH] D148460: [clang-tidy] Add alias cppcoreguidelines-use-default-member-init

2023-04-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko accepted this revision. Eugene.Zelenko added a comment. Please create issue for deprecation after commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148460/new/ https://reviews.llvm.org/D148460 ___

[PATCH] D151092: [clang-tidy]performance-no-automatic-move: fix false negative on `const T&&` ctors.

2023-05-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:385 +- Improved :doc:`performance-no-automatic-move + `: warn on `const &&` + constructors. Please use double back-ticks for `const &&`. Comment at: c

[PATCH] D151383: [clang-tidy] Check for specific return types on all functions

2023-05-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please extend test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151383/new/ https://reviews.llvm.org/D151383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D151383: [clang-tidy] Check for specific return types on all functions

2023-05-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:394 +- Extend ``bugprone-unused-return-value`` check to check for all functions + with specified return types using the ``CheckedReturnTypes`` option. Please keep alphabe

[PATCH] D151383: [clang-tidy] Check for specific return types on all functions

2023-05-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:398 + Removed checks Excessive newline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151383/new/ https://reviews.llvm.o

[PATCH] D148793: [clang-tidy] Implement an include-cleaner check.

2023-05-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:186 +- New :doc:`misc-include-cleaner + ` check. Please keep alphabetical order (by check name) in this section. Comment at: clang-tools-extra/docs/Rel

[PATCH] D143843: [clang-tidy][NFC] Remove ModernizeTidyModule::getModuleOptions

2023-02-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko accepted this revision. Eugene.Zelenko added a comment. This revision is now accepted and ready to land. But will be good idea to notify authors of checks if they are still active. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143843/

[PATCH] D143851: [clang-tidy] Tweak 'rule of 3/5' checks to allow defaulting a destructor outside the class.

2023-02-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/special-member-functions.rst:28 - When set to `true` (default is `false`), this check doesn't flag classes with a sole, explicitly - defaulted destructor. An examp

[PATCH] D143996: [clang-tidy][doc] Remove unused variable

2023-02-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko requested changes to this revision. Eugene.Zelenko added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-non-const-global-variables.rst:35 -Variables: ``a``, ``c``, ``c_

[PATCH] D144037: [clang-tidy] allow tests to use -config-file instead of -config

2023-02-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/check_clang_tidy.py:111 if not any( -[arg.startswith('-config=') for arg in self.clang_tidy_extra_args]): +[arg.startswith('-config=') or arg.startswith('-config-file=') for a

[PATCH] D144216: [clang-tidy] Extract string header from redundant-string-cstr checker

2023-02-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. May be you could use heard in other test in same patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144216/new/ https://reviews.llvm.org/D144216 ___ cfe-commits mailing

[PATCH] D144594: [clang-tidy] Fix bugprone-copy-constructor-init documentation

2023-02-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/copy-constructor-init.rst:37 + +In summary check detects cases where the copy constructor of a derived class +doesn't properly call or initialize the copy constructor of the base

[PATCH] D146921: [clang-tidy] Implement cppcoreguidelines F.19

2023-05-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:136 +- New :doc:`cppcoreguidelines-missing-std-forward + ` check. Should be after `cppcoreguidelines-misleading-capture-default-by-value`. Repository: rG LLVM Github

[PATCH] D148793: [clang-tidy] Implement an include-cleaner check.

2023-04-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Is there real advantage in Clang-tidy check versus standalone tool? Comment at: clang-tools-extra/docs/ReleaseNotes.rst:144 + + FIXME: add release notes. + Please add one sentence description. Comment at: cla

[PATCH] D148793: [WIP][clang-tidy] Implement an include-cleaner check.

2023-04-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D148793#4283733 , @carlosgalvezp wrote: > I believe this should be discussed in an RFC. We already have the standalone > `include-cleaner` tool, why is that not sufficient? Can it be extended > instead? There's also t

[PATCH] D149088: [clang-format] Add run-clang-format.py script.

2023-04-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/tools/run-clang-format.py:1 +#!/usr/bin/env python3 +# Looks like Windows en of lines were mixed with UNIX ones. Comment at: clang/tools/run-clang-format.py:26 + +from __future__ import pr

[PATCH] D149084: [clang-tidy] Added bugprone-multi-level-implicit-pointer-conversion check

2023-04-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/multi-level-implicit-pointer-conversion.rst:43 +safety of the conversion before using an explicit cast. +This extra level of caution can help catch potential issues early on in th

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-04-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/PrintfToStdPrintCheck.cpp:66 + if (Converter.canApply()) { +const auto *PrintfCall = Printf->getCallee(); +DiagnosticBuilder Diag = Please don't use `auto` unless ty

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-04-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize/printf-to-std-print.rst:73 + printf-style format string and the arguments to be formatted follow + immediately afterwards. + mikecrowe wrote: > Eugene.Zelenk

[PATCH] D152589: Add readability test for not allowing relative includes

2023-06-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/AbsoluteIncludesOnlyCheck.cpp:16 + + +namespace clang::tidy::readability { Excessive newline. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:187 +

[PATCH] D128372: [Clang-Tidy] Empty Check

2022-12-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please take a loon on https://github.com/llvm/llvm-project/issues/59487. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128372/new/ https://reviews.llvm.org/D128372 ___ cfe

[PATCH] D139966: [clang-tidy] Use Python3 for add_new_check.py and rename_check.py

2022-12-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:204 +- Change to Python 3 in the shebang of `add_new_check.py` and `rename_check.py`, as the existing + code is not compatible with Python 2. Should be at the beginning

[PATCH] D139966: [clang-tidy] Use Python3 for add_new_check.py and rename_check.py

2022-12-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko accepted this revision. Eugene.Zelenko added a comment. This revision is now accepted and ready to land. Looks OK for me, but will be good idea to wait for couple of days for other eyes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

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

2016-12-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to extend check for class members. Comment at: test/clang-tidy/readability-one-name-per-declaration-modern.cpp:13 + public: +vector() {} +vector(initializer_list init) {} Please use

[PATCH] D24487: [Clang] Fix some Clang-tidy modernize-use-bool-literals and Include What You Use warnings in AST; other minor fixes

2016-12-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: lib/ASTMatchers/Dynamic/Parser.cpp:617 -} // namespace dynamic -} // namespace ast_matchers -} // namespace clang +} // end namespace dynamic +} // end namespace ast_matchers Prazek wrote: > I think check sho

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/misc/InvalidRangeCheck.cpp:78 +void InvalidRangeCheck::check(const MatchFinder::MatchResult &Result) { + + const auto *FirstArg = Result.Nodes.getNodeAs("first_arg"); Please remove empty line. ==

[PATCH] D27815: [clang-tidy] Add obvious module for obvious bugs

2016-12-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I'm not sure that this is good name for module. Singe reason for this is check for STL algorithms, may be //stl// module is more correct destination? https://reviews.llvm.org/D27815 ___ cfe-commits mailing list cfe-

[PATCH] D27815: [clang-tidy] Add obvious module for obvious bugs

2016-12-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. There are many other checks or compiler warnings which could be classified as obvious bugs. https://reviews.llvm.org/D27815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It may be good idea to create LLVM check which will suggest to use STLExtras.h wrappers instead of STL algorithms. https://reviews.llvm.org/D27806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D31252: [clang-tidy] add readability-compound-statement-size check.

2017-03-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Will be good idea to run Clang-tidy modernize and readability checks over new code. Comment at: clang-tidy/readability/CompoundStatementSizeCheck.cpp:41 + ++Info.B

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2017-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to make this check working in both ways (standard or alternative operator representations), depending on option. Probably readability-operators-representation will be better name for check. See also PR25195. https://reviews.llvm.org/D3

[PATCH] D31370: [clang-tidy] Prototype to check for exception specification

2017-03-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/modernize-noexcept-correctness.rst:7 +This check will mark functions as noexcept if that is possible. +`noexcept` is a new keyword in C

[PATCH] D31408: Add more examples to clang-format configuration

2017-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ClangFormatStyleOptions.rst:644 + .. code-block:: c++ + Shouldn't it be java? Comment at: docs/ClangFormatStyleOptions.rst:1293 + .. code-block:: c++ + Shouldn't it b

[PATCH] D31370: [clang-tidy] Prototype to check for exception specification

2017-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/modernize-noexcept-correctness.rst:41 + +- AnnotateThrow -> boolean if a function that can throw for sure will be annotated with `noexcept(false)` JonasToth wrote: > Eugene.Zelenko wrot

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2017-04-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/OperatorsRepresentationCheck.cpp:34 + + if (const auto *B = Result.Nodes.getNodeAs("binary")) { +switch (B->getOpcode()) { aaron.ballman wrote: > alexfh wrote: > > aaron.ballman wrote:

[PATCH] D31757: [clang-tidy] Add a clang-tidy check for possible inefficient vector operations

2017-04-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Isn't such analysis is path-sensitive and should be implemented in Static Analyzer? Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/performance-inefficient-vector-operation.rst:6 +

[PATCH] D31805: [clang-tidy] Mention "add the check to release note" in add_new_check.py.

2017-04-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I don't know how hard it'll be to implement, but will be great to add - New ` `_ check Please add short description here. into "Improvements to clang-tidy" section. Ideally according to alphabetic order. h

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

2017-01-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. General question: isn't Static Analyzer is better place for such workflow checks? Repository: rL LLVM https://reviews.llvm.org/D29151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

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

2017-01-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D29151#657435, @Prazek wrote: > In https://reviews.llvm.org/D29151#656887, @Eugene.Zelenko wrote: > > > General question: isn't Static Analyzer is better place for such workflow > > checks? > > > Probably yes, but it is much harder to i

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

2017-01-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:60 -The improvements are... +Added a safety module for safety-critical checks like those from High Integrity C++. + Please take look on Release Notes format in previous r

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

2017-01-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. > I think we need some sort of clear guidelines on where what functionality > should be added. Even right now there are clang-tidy checks that finds subset > of alpha checks, but probably having lower false positive rate. The other > example is Use after move, th

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

2017-02-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/safety/NoAssemblerCheck.cpp:13 +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/Lex/Lexer.h" + aaron.ballman wrote: > Is this include needed? Will be good idea to run In

[PATCH] D29692: [clang-tidy] add check modernize-use-const-instead-of-define

2017-02-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). This check is also should be included into cppcoreguidelines module. Or may be moved there? Comment at: clang-tidy/modernize/UseConstInsteadOfDefineCheck.cpp:41 +/// ot

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-06-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko requested changes to this revision. Eugene.Zelenko added a comment. This revision now requires changes to proceed. Please wait for Alexander, Aaron or Haojian approval. Comment at: clang-tidy/android/CloexecOpenCheck.cpp:22 namespace { static constexpr const

[PATCH] D35257: [clang-tidy] Add new modernize use unary assert check

2017-07-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: clang-tidy/modernize/UnaryStaticAssertCheck.cpp:28 +void UnaryStaticAssertCheck::check(const MatchFinder::MatchResult &Result) { + + const auto *MatchedDecl

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D34913#806799, @yawanng wrote: > In https://reviews.llvm.org/D34913#797577, @Eugene.Zelenko wrote: > > > Please wait for Alexander, Aaron or Haojian approval. > > > Could you please check this CL? Thank you. You could commit changes, s

[PATCH] D35372: [clang-tidy] Add a close-on-exec check on memfd_create() in Android module.

2017-07-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `android-cloexec-memfd_create + `_ check Please sort checks in alphabetical order. Repository

[PATCH] D35370: [clang-tidy] Add a close-on-exec check on inotify_init() in Android module.

2017-07-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `android-cloexec-inotify-init + `_ check Please sort checks in alphabetical order. Repository

[PATCH] D35368: [clang-tidy] Add a close-on-exec check on inotify_init1() in Android module.

2017-07-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `android-cloexec-inotify-init1 + `_ check Please sort checks in alphabetical order. Reposito

[PATCH] D35367: [clang-tidy] Add a close-on-exec check on epoll_create() in Android module.

2017-07-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `android-cloexec-epoll-create + `_ check Please sort checks in alphabetical order. Repository

[PATCH] D35365: [clang-tidy] Add a close-on-exec check on epoll_create1() in Android module.

2017-07-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/android/CloexecEpollCreate1Check.cpp:21 + +static constexpr const char *EPOLL_CLOEXEC = "EPOLL_CLOEXEC"; + Please make this declaration consent across all checks. In some checks it declared inside name

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/readability-static-accessed-through-instance.rst:7 +Checks for member expressions that access static members through instances, and +replaces them with the corresponding expressions that use a more readable

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It also seems that your code is not based on trunk, since Release Notes were cleared when version was changed to 6. Please update. Repository: rL LLVM https://reviews.llvm.org/D35937 ___ cfe-commits mailing list c

[PATCH] D41963: [clang-tidy] Adding Fuchsia checker for thread local storage.

2018-01-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fuchsia/ThreadLocalCheck.cpp:22 + // Using thread-local storage is disallowed. +Finder->addMatcher(varDecl(hasThreadStorageDuration()).bind("decl"), this); +} Please run Clang-format over file. Thi

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-avoid-goto.rst:6-7 + +The usage of ``goto`` has been discouraged for a long time and is diagnosed +with this check. + JonasToth wrote: > aaron.ballman wrote: > > This doesn

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-01-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/cppcoreguidelines/MacroUsageCheck.h:15 +#include "clang/Lex/Preprocessor.h" + +namespace clang { Please include . Comment at: docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst:

[PATCH] D42261: [clang-tidy objc-property-declaration] New option AdditionalAcronyms

2018-01-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/objc-property-declaration.rst:45 + + If set, replaces the default list. (If you want to append to the default list, set AdditionalAcronyms instead.) + Please limit string length to 80 sym

[PATCH] D42682: [clang-tidy] Add misc-io-functions-misused checker

2018-01-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. May be //bugprone// is better module then //misc//? Comment at: docs/ReleaseNotes.rst:63 + + Check if the fgetwc, getwc, getwchar, istream::get standard iostream C functions + return values incorrectly stored in char type value. -

[PATCH] D42730: Add clang-tidy check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-01-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `modernize-avoid-functional + `_ check Please move it to new checks section in alphabetical order

[PATCH] D30158: [clang-tidy] modernize: Find usage of random_shuffle and replace it with shuffle.

2017-02-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:78 + + Finds and fixes usage of random_shuffle as the function has been removed from C++17. + Please add std:: and enclose random_shuffle in ``. Comment at: docs/clang-ti

[PATCH] D30650: [clang-tidy] misc-use-after-move: Fix failing assertion

2017-03-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think we should refactor this check as part of Static Analyzer, since it's path-sensitive. https://reviews.llvm.org/D30650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D30650: [clang-tidy] misc-use-after-move: Fix failing assertion

2017-03-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D30650#695350, @klimek wrote: > In https://reviews.llvm.org/D30650#693165, @Eugene.Zelenko wrote: > > > I think we should refactor this check as part of Static Analyzer, since > > it's path-sensitive. > > > Are you saying it should be p

[PATCH] D30896: [CLANG-TIDY] add check misc-prefer-switch-for-enums

2017-03-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:96 + + Finds uses of enumeration values in equality and inequality expressions where a switch would be preferred. + Please highlight switch with `` and indent preferred on

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

2016-11-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be worth to mention enhancement in Release Notes. https://reviews.llvm.org/D27166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/misc-string-compare.rst:8 + +A common mistake is to use the string's compare method instead of using the +equality or inequality opera

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

2016-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D27166#608339, @malcolm.parsons wrote: > In https://reviews.llvm.org/D27166#606772, @Eugene.Zelenko wrote: > > > It'll be worth to mention enhancement in Release Notes. > > > They already say this: > > - The `modernize-use-auto >

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

2016-11-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-type-promotion-in-math-fn.rst:6 + +Finds calls to math.h functions with implicit float to double promoti

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

2016-11-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-type-promotion-in-math-fn.rst:6 + +Finds calls to math.h functions with implicit float to double promotions. + jlebar wrote: > Eugene.Zelenko wrote: > > Please

[PATCH] D27520: [clang-tidy] Add check for redundant function pointer dereferences

2016-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/readability-redundant-function-ptr-dereference.rst:7 +Finds redundant dereferences of a function pointer. +See https://youtu.be/6eX9gP

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

2016-12-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. How does check handle bit fields? I encountered problem on next code in ASTContext.h: struct TypeInfo { uint64_t Width; unsigned Align; bool AlignIsRequired : 1; TypeInfo() : Width(0), Align(0), AlignIsRequired(false) {} }; Will be also good idea to

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

2016-12-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). This is duplicate of https://reviews.llvm.org/D25024. Will be goo idea to combine code in one. Please note that there are multiple coding guidelines which suggest this style. https://r

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

2016-12-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:47 +// Single declarations and macros will be ignored +if (DeclStmt->isSingleDecl() == false && +DeclStmt->getLocStart().isMacroID() == false) { ---

[PATCH] D27655: Fix modernize-deprecated-headers clang-tidy warnings

2016-12-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Did you enable analysis of headers in Clang-tidy? Comment at: lib/Frontend/CompilerInstance.cpp:51 #include -#include +#include #include Will be good idea to run Clang-format or sort headers manually. Com

[PATCH] D27655: Fix modernize-deprecated-headers clang-tidy warnings

2016-12-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Yes, IWYU is useful tool, but please note that it's not ideal, so will be good idea to check proposed changes manually. You could build IWYU in-tree with Clang or Clang extra tools. https://reviews.llvm.org/D27655 _

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/readability-strlen-argument.rst:6 + +This checker will detect addition in strlen() argument. Example code: + JonasToth

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It may be good idea to add check for arguments which taken from C++ containers like std::string, std::string_view, etc. Repository: rL LLVM https://reviews.llvm.org/D32346 ___ cfe-commits mailing list cfe-commits@

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. > In https://reviews.llvm.org/D32346#733906, @Eugene.Zelenko wrote: > >> It may be good idea to add check for arguments which taken from C++ >> containers like std::string, std::string_view, etc. > > > Not sure how you want. Do you envision something like: > >

[PATCH] D32436: [clang-tidy] Support detecting for-range loop in inefficient-vector-operation check.

2017-04-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/performance-inefficient-vector-operation.rst:6 Finds possible inefficient `std::vector` operations (e.g. `push_back`) that may cause unnecessary memory reallocations. Please use `` to h

[PATCH] D32700: [clang-tidy] Add misc-suspicious-memset-usage check.

2017-05-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/misc-suspicious-memset-usage.rst:6 + +This check finds memset calls with potential mistakes in their arguments. +Considering the functi

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. We have misc-unconventional-assign-operator and google-runtime-operator checks already. Form user perspective, I think will be good idea to have single check for different operators. Comment at: docs/ReleaseNotes.rst:63 + + Checks if the overl

[PATCH] D33304: [clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please run clang-format over your code. Please add documentation and mention this check in docs/ReleaseNotes.rst (in alphabetical order). https://reviews.llvm.org/D33304 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D33304: [WIP][clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/android/AndroidTidyModule.cpp:15 +#include "../ClangTidyModuleRegistry.h" +#include "../readability/BracesAroundStatementsCheck.h" +#include "../readability/FunctionSizeCheck.h" Are readability headers

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-01-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.h:19 + +/// FIXME: Write a short description. +/// njames93 wrote: > FIXME Please do this :-) Comment at: clang-tools-extra/clang-tidy/mod

[PATCH] D56644: [clang-tidy] readability-container-size-empty handle std::string length()

2022-01-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be great to finalize patch and close issue #37603. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56644/new/ https://reviews.llvm.org/D56644 ___ cfe-commits mailing li

[PATCH] D117939: [clang-tidy] Add more documentation about check development

2022-01-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It's also make sense to mention `isLanguageVersionSupported`. Comment at: clang-tools-extra/docs/clang-tidy/Contributing.rst:79 +`Sphinx `_ and enable it in the CMake configuration. +To save build time of t

[PATCH] D117939: [clang-tidy] Add more documentation about check development

2022-01-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/Contributing.rst:232 + +If your check applies only to specific versions of the C++ standard, you will +want to override the method ``isLanguageVersionSupported`` to reflect that.

[PATCH] D117939: [clang-tidy] Add more documentation about check development

2022-01-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/Contributing.rst:232 + +If your check applies only to specific dialect of C or C++, you will +want to override the method ``isLanguageVersionSupported`` to reflect that. Objective

<    4   5   6   7   8   9   10   >