[PATCH] D154287: [clang-tidy] Add modernize-use-std-format check

2023-08-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:168 +- New :doc:`modernize-use-std-format + ` check. Please keep alphabetical order (by check name) in this section. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D158480: [clang-tidy][readability-braces-around-statements] ignore false-positive for constexpr if statement in lambda expression

2023-08-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:233 + ` check to + ignore false-positive for constexpr if statement in lambda expression. + `if constexpr`? Please also enclose it in double back-ticks. Repository:

[PATCH] D158244: [clang-tidy]`pro-bounds-array-to-pointer-decay` ignore predefined expression

2023-08-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:191 + ` check + to ignore predefined expression (e.g., __func__, ...). + Please enclose `__func__` in double back-ticks. Repository: rG LLVM Github Monorepo

[PATCH] D158152: [clang-tidy]mark record initList as non-const param

2023-08-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:234 +- Improved :doc:`readability-non-const-parameter.cpp + ` check to ignore Please keep alphabetical order (by check name) in this section. Repository: rG LLVM

[PATCH] D157326: [clang-tidy] Fix handling of out-of-line functions in readability-static-accessed-through-instance

2023-08-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp:23 static unsigned getNameSpecifierNestingLevel(const QualType ) { if (const ElaboratedType *ElType = QType->getAs()) { if (const

[PATCH] D157239: [clang-tidy] Implement bugprone-incorrect-enable-if

2023-08-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/incorrect-enable-if.rst:6 + +Detects incorrect usages of std::enable_if that don't name the nested 'type' +type. Please synchronize with statement in Release

[PATCH] D157188: [clang-tidy] Add bugprone-allocation-bool-conversion

2023-08-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/AllocationBoolConversionCheck.cpp:25 + "malloc;calloc;realloc;strdup;fopen;fdopen;freopen;" + "opendir;fdopendir;popen;mmap;allocate"))) {} +

[PATCH] D157188: [clang-tidy] Add bugprone-new-bool-conversion

2023-08-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D157188#4563139 , @PiotrZSL wrote: > In D157188#4563105 , > @Eugene.Zelenko wrote: > >> Shouldn't C-style allocation be checked too? Same for custom allocators via >>

[PATCH] D157188: [clang-tidy] Add bugprone-new-bool-conversion

2023-08-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Same for file, threads and other resources allocation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157188/new/ https://reviews.llvm.org/D157188 ___ cfe-commits mailing

[PATCH] D157188: [clang-tidy] Add bugprone-new-bool-conversion

2023-08-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Shouldn't C-style allocation be checked too? Same for custom allocators via configuration option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157188/new/ https://reviews.llvm.org/D157188

[PATCH] D157057: [clang-tidy] Implement cppcoreguidelines CP.52

2023-08-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:156 +- New :doc:`cppcoreguidelines-no-suspend-with-lock + ` check. Please keep alphabetical order in new checks list. Comment at:

[PATCH] D144135: [clang-tidy] Add performance-enum-size check

2023-07-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D144135#4524902 , @PiotrZSL wrote: > @Eugene.Zelenko I cannot review/accept my own patch :(. I'm sorry for noise. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D154999: [clang-tidy] Add bugprone-std-forward-type-mismatch check

2023-07-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/std-forward-type-mismatch.rst:28 +is a mismatch between the type passed as an argument and the template parameter. + Excessive newline. Repository: rG LLVM

[PATCH] D154287: [clang-tidy] Add modernize-use-std-format check

2023-07-03 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-format.rst:6 + +Converts calls to ``absl::StrFormat`` to equivalent calls to C++20's +``std::format`` function, modifying the format string appropriately. The

[PATCH] D154297: clang-tidy: accessing checks not done for aliases of `std::array`

2023-07-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this change in Release Notes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154297/new/ https://reviews.llvm.org/D154297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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 >

[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 +

[PATCH] D153423: [clang-tidy] Allow explicit throwing in bugprone-exception-escape for special functions

2023-06-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/exception-escape.rst:29 +and destructors, it is a clear indication of the developer's intention and +should be respected.. + Double period. Repository: rG

[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] 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:

[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/

[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

[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

[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:

[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] 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: >

[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

[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

[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

[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

[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:

[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] 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

[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++ -*-===// +//===---

[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/

[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

[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

[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/

[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] 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

[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] 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.

[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] D147081: [clang-tidy] Fix issues in bugprone-assert-side-effect

2023-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp:66 + + const auto *FuncDecl = CExpr->getDirectCallee(); + if (!FuncDecl || !FuncDecl->getDeclName().isIdentifier()) PiotrZSL wrote: >

[PATCH] D147081: [clang-tidy] Fix issues in bugprone-assert-side-effect

2023-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp:66 + + const auto *FuncDecl = CExpr->getDirectCallee(); + if (!FuncDecl || !FuncDecl->getDeclName().isIdentifier()) Please do not use `auto` if

[PATCH] D145581: [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments.

2023-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:222 -- Improved :doc:`bugprone-use-after-move - ` to understand that there is a - sequence point between designated initializers. +- In :doc:`bugprone-use-after-move + `:

[PATCH] D146947: [docs][clang] Added extra information inside the flag -fsanitize=unsigned-shift-base for UndefinedBehaviorSanitizer Fix : #60712

2023-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/docs/UndefinedBehaviorSanitizer.rst:160 - ``-fsanitize=unsigned-shift-base``: check that an unsigned left-hand side of - a left shift operation doesn't overflow. + a left shift operation doesn't overflow.Issues

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

2023-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:127 + + Warns when a forwarding reference parameter is not forwarded within the function body. + Please follow 80 characters limit for text. Repository: rG LLVM

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

2023-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/performance/noexcept-move-constructor-fix.cpp:64 // CHECK-FIXES: ){{.*}}noexcept{{.*}} {} \ No newline at end of file Please add. Repository: rG LLVM Github

[PATCH] D146904: [clang-tidy] Fix extern fixes in readability-redundant-declaration

2023-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp:84 + SourceLocation BeginLoc; + if (const LinkageSpecDecl *Extern = + Result.Nodes.getNodeAs("extern"); `auto` could

[PATCH] D145617: [clang-tidy] Add readability-avoid-unconditional-preprocessor-if check

2023-03-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:139 + + Check flags always enabled or disabled code blocks in preprocessor ``#if`` + conditions, such as ``#if 0`` and ``#if 1`` etc. Please omit `Check`.

[PATCH] D144522: [clang-tidy] Add readability-operators-representation check

2023-03-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:139 + + Check helps enforce consistent token representation for invoked binary, + unary and overloaded operators in C++ code. Please omit `Check`.

[PATCH] D146655: [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name

2023-03-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:237 +- Fixed an issue in :doc:`google-avoid-underscore-in-googletest-name + ` when using carlosgalvezp wrote: > Eugene.Zelenko wrote: > > carlosgalvezp wrote: > > >

[PATCH] D146655: [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name

2023-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:237 +- Fixed an issue in :doc:`google-avoid-underscore-in-googletest-name + ` when using carlosgalvezp wrote: > Eugene.Zelenko wrote: > > Eugene.Zelenko wrote: > > >

[PATCH] D146712: [clang-tidy] Add portability-non-portable-integer-constant check

2023-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please add alias entry in Release Notes. Comment at: clang-tools-extra/clang-tidy/portability/NonPortableIntegerConstantCheck.cpp:95 + + +void NonPortableIntegerConstantCheck::check( Excessive newline.

[PATCH] D146655: [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name

2023-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:237 +- Fixed an issue in :doc:`google-avoid-underscore-in-googletest-name + ` when using Eugene.Zelenko wrote: > carlosgalvezp wrote: > > PiotrZSL wrote: > > >

[PATCH] D146655: [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name

2023-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:237 +- Fixed an issue in :doc:`google-avoid-underscore-in-googletest-name + ` when using carlosgalvezp wrote: > PiotrZSL wrote: > > carlosgalvezp wrote: > > >

[PATCH] D146713: [clang-tidy][NFC] Improve naming convention in google-readability-avoid-underscore-in-googletest-name

2023-03-23 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 give a chance to other reviewers to take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146655: [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name

2023-03-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:237 +- Fixed an issue in :doc:`google-avoid-underscore-in-googletest-name + ` when using Please keep alphabetical order (by check name) in this section. Repository:

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-03-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReferenceToConstructedTemporaryCheck.cpp:22 + bool operator()(const internal::BoundNodesMap ) const { +auto *Other = Nodes.getNode(ID).get(); +if (!Other) `const

[PATCH] D146288: clang-tidy: Detect use-after-move in CXXCtorInitializer

2023-03-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:190 +- Improved :doc:`bugprone-use-after-move + ` check to also cover constructor Please keep alphabetical order (by check name) in this section. CHANGES SINCE LAST

[PATCH] D145865: [clang-tidy] Multiple fixes to bugprone-exception-escape

2023-03-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:491 if (const auto *ThrownExpr = Throw->getSubExpr()) { - const auto *ThrownType = - ThrownExpr->getType()->getUnqualifiedDesugaredType(); - if

[PATCH] D145720: [clang-tidy] Finish cppcoreguidelines-avoid-capturing-lambda-coroutines check

2023-03-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:126 - Adds check for cpp core guideline: "CP.51: Do not use capturing lambdas that - are coroutines." - + Check flags C++20 coroutine lambdas with non-empty capture lists that may +

[PATCH] D145617: [clang-tidy] Add readability-avoid-unconditional-preprocessor-if check

2023-03-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/AvoidUnconditionalPreprocessorIfCheck.cpp:29 + return; +auto = PP.getSourceManager(); +if (!isStatic(SM, PP.getLangOpts(), ConditionRange)) Please don't use

[PATCH] D145581: [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments.

2023-03-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp:1379 +}; \ No newline at end of file Please add. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D145138: [clang-tidy] Implement FixIts for C arrays

2023-03-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp:588 +: ClangTidyCheck(Name, Context), + IncludeInserter(Options.getLocalOrGlobal("IncludeStyle", +

[PATCH] D145138: [clang-tidy] Implement FixIts for C arrays

2023-03-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp:94 + + auto StartOfFile = SM.getLocForStartOfFile(SM.getFileID(Location)); + while (Location != StartOfFile) { Please do not use `auto` unless type

[PATCH] D142587: [clang-tidy] Improved too-small-loop-variable with bit-field support

2023-02-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. @carlosgalvezp: Sorry, there are too much Clang specifics in this patch, so I could not be reviewer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142587/new/ https://reviews.llvm.org/D142587

[PATCH] D144748: [clang-tidy] Add bugprone-empty-catch check

2023-02-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/empty-catch.rst:169 +should be provided. If an exception type name in the list is caught in an +empty catch statement, no warning will be raised. Default value: ``

[PATCH] D144748: [clang-tidy] Add bugprone-empty-catch check

2023-02-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EmptyCatchCheck.cpp:77 +void EmptyCatchCheck::registerMatchers(MatchFinder *Finder) { + + auto AllowedNamedExceptionDecl = Excessive newline. Comment at:

[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] 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] 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

[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``,

[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

[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

[PATCH] D142655: [clang-tidy] Introduce HeaderFileExtensions and ImplementationFileExtensions options

2023-02-05 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 please wait for other opinion(s). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142655/new/

[PATCH] D142655: [clang-tidy] Introduce HeaderFileExtensions and ImplementationFileExtensions options

2023-02-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp:31 +: ClangTidyCheck(Name, Context) { + std::optional HeaderFileExtensionsOption = + Options.get("HeaderFileExtensions"); Will

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:104 +Checks that all implicit and explicit inline functions in header files are +tagged with the ``LIBC_INLINE`` macro. See the `libc style guide +`_

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please add entry in Release Notes. Comment at: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp:29 + + auto SrcBegin = FuncDecl->getSourceRange().getBegin(); + // Consider functions only in header files.

[PATCH] D142307: [clang-tidy][NFC] Use C++17 nested namespaces in clang-tidy headers

2023-01-22 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 please fix small formatting issues. Will be good idea to await for other eyes. Comment at:

[PATCH] D141000: [clang-tidy] Introduce HeaderFileExtensions and ImplementationFileExtensions options

2023-01-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. D142123 also cries for it :-) Somehow I was not able to make comments there :-( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141000/new/ https://reviews.llvm.org/D141000

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureDefaultWhenCapturingThisCheck.cpp:1 +//===--- AvoidCaptureDefaultWhenCapturingThisCheck.cpp - clang-tidy +//-===// Ditto.

[PATCH] D141769: [clang-tidy][NFC] Use C++17 nested namespaces in add_new_check.py and rename_check.py

2023-01-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:109-110 +- Use C++17 nested namespaces in `add_new_check.py` and `rename_check.py`. + New checks njames93 wrote: > Such a trivial change like this probably doesn't need

[PATCH] D141769: [clang-tidy][NFC] Use C++17 nested namespaces in add_new_check.py and rename_check.py

2023-01-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/rename_check.py:311 filename = fileRename(filename, old_module_path, new_module_path) + # TODO: remove below replacement when all clang-tidy checks have been + # updated with C++17

[PATCH] D141769: [clang-tidy][NFC] Use C++17 nested namespaces in add_new_check.py and rename_check.py

2023-01-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. But will be good idea if other eyes will look too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141769/new/

[PATCH] D141000: [clang-tidy] Introduce HeaderFileExtensions and ImplementationFileExtensions options

2023-01-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 please improve Release Notes. Will be good idea to wait for developers approval. Comment at:

[PATCH] D141583: [clang-tidy][doc] Deprecate the AnalyzeTemporaryDtors option

2023-01-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:107 + which is no longer in use. The option will be fully removed in + :program:`clang-tidy-18`. + But isn't such naming artifact of packaging? May be

[PATCH] D141583: [clang-tidy][doc] Deprecate the AnalyzeTemporaryDtors option

2023-01-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:106 +- Deprecate the global configuration file option `AnalyzeTemporaryDtors`, + which is no longer in use. The option will be fully removed in clang-tidy 18. +

[PATCH] D141391: [NFC] [clang-tools-extra] Alphabetize clang-tidy release notes

2023-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a subscriber: carlosgalvezp. Eugene.Zelenko added a comment. In D141391#4040002 , @ccotter wrote: > I can't land these myself, so if you are able to, would you mind doing so? > Thanks! @carlosgalvezp: Could you please help?

[PATCH] D141391: [NFC] [clang-tools-extra] Alphabetize clang-tidy release notes

2023-01-10 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. Thank you for fix! Such issues may be result of rebase artifacts and slip into code base. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:219 +- Improved :doc:`modernize-loop-convert ` to + refactor container based for loops that initialize iterators with free function calls Please keep alphabetical

[PATCH] D141000: [clang-tidy] Introduce HeaderFileExtensions and ImplementationFileExtensions options

2023-01-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be good idea to check that `HeaderFileExtensions` and `ImplementationFileExtensions` do not overlap. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141000/new/ https://reviews.llvm.org/D141000

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureThisWithCaptureDefaultCheck.cpp:32 + if (Capture.getCaptureKind() == LCK_ByRef) { +SourceManager = Context.getSourceManager(); +SourceLocation

[PATCH] D141144: [clang-tidy][doc] Improve clang-tidy documentation

2023-01-06 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 wait for other reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141144/new/

[PATCH] D141144: [clang-tidy][doc] Improve clang-tidy documentation

2023-01-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko accepted this revision. Eugene.Zelenko added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/docs/clang-tidy/index.rst:142 e.g. --config-file=/some/path/myTidyConfigFile -

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:115 + Warns when lambda specify a capture default and capture ``this``. The check also + offers FixIts. + `fix-it`. Comment at:

[PATCH] D141118: [clang-tidy][NFC] Remove unused User argument in misc-misleading-bidirectional check

2023-01-06 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 please wait for more active developers' opinion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141118/new/

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.cpp:107 << E->getSourceRange(); +auto LocForEndOfToken = +Lexer::getLocForEndOfToken(E->getEndLoc(), 0, SM,

[PATCH] D140968: [clang-tidy] Add check for passing the result of `std::string::c_str` to `strlen`

2023-01-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/StrlenStringCStrCheck.h:1 +//===--- StrlenStringCStrCheck.h - clang-tidy *- C++ -*-===// +// Should be 80 characters long. See other checks as example.

  1   2   3   4   5   6   7   8   9   10   >