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

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyOnLastUseCheck.cpp:1 +//===--- UnnecessaryCopyOnLastUseCheck.cpp - +// clang-tidy---===// Please make single line. Co

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-on-last-use.rst:4 +performance-unnecessary-copy-on-last-use +== + Please make same length as title.

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-on-last-use.rst:6 + +Finds variables of non-trivially-copyable types, that are used in a copy construction on their last usage and suggest to wrap the usage i

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyOnLastUseCheck.cpp:1 +//===--- UnnecessaryCopyOnLastUseCheck.cpp - clang-tidy===// +// Please put space after `clang-tidy`. =

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyOnLastUseCheck.h:1 +//===--- UnnecessaryCopyOnLastUseCheck.h - clang-tidy-*- C++-*-===// +// Sorry, overlooked last time. Please add space afte

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2022-11-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:121 + + Converts standard library type traits of the form `traits<...>::type` and + `traits<...>::value` into `traits_t<...>` and `traits_v<...>` respectively. Please use

[PATCH] D137340: [clang-tidy] Add modernize-use-anonymous-namespace check

2022-11-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseAnonymousNamespaceCheck.cpp:31 +static bool isInAnonymousNamespace(const Decl *Decl) { + const auto *DC = Decl->getDeclContext(); + if (DC && DC->isNamespace()) { Pleas

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2022-11-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/TypeTraitsCheck.h:17 +namespace tidy { +namespace modernize { + tschuett wrote: > Why do you refuse to use nested namespaces in `modernize` ? I think this is done for legacy

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-on-last-use.rst:40 +.. option:: BlockedFunctions + A semicolon-separated list of names of functions who's parameters do not + participate in the resolution

[PATCH] D137740: [clang-tidy][NFC] Fix namespace comments in AvoidThrowingObjCExceptionCheck.cpp 🧹

2022-11-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Will be good idea to combine this patch with D137738 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137740/new/ https://reviews.llvm.org/D137740 __

[PATCH] D137740: [clang-tidy][NFC] Fix namespace comments in AvoidThrowingObjCExceptionCheck.cpp 🧹

2022-11-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D137740#3918335 , @stephanemoore wrote: > In D137740#3918271 , > @Eugene.Zelenko wrote: > >> Will be good idea to combine this patch with D137738 >>

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

2022-11-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/fold-init-type.cpp:205 } + Excessive newline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137782/new/ https

[PATCH] D138031: Add clang-tidy check for missing move constructors

2022-11-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance/missing-move-constructor.rst:6 + +Warns when a class has a copy constructor but not move constructor. + Please synchronize this sentence with Release Notes.

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

[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 +`_ f

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

[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/ https://reviews

[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. + `Clang-tidy

[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 ":program:`clang-tid

[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: clang-tools-extra/docs/ReleaseNotes.rst:109

[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/ https://reviews.llv

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

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

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

[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] 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: clang-tools-extra/clang-tidy/utils/FixItHintU

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp:26 +// of the left and right statements. +const Expr *LHSExpr = llvm::dyn_cast(LHS); +const Expr *RHSExpr = llvm::dyn_cast(RHS); `auto` could

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please add documentation for check. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:121 +- New :doc:`bugprone-standalone-empty + ` check. + Path to documentation was changed recently. Comment at: clang-too

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Tests locations were changed recently too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128372/new/ https://reviews.llvm.org/D128372 ___ cfe-commits mailing list cfe-comm

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:236 +- Fixed a false positive in :doc:`bugprone-branch-clone + ` when the branches ishaangandhi wrote: > ishaangandhi wrote: > > Eugene.Zelenko wrote: > > > Documentation

[PATCH] D128401: [Clang-tidy] Fixing a bug raising false alarms on static local variables in the Infinite Loop Checker

2022-06-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:159 +llvm::SmallSet &Callees) { +if (const CallExpr *Call = dyn_cast(StmtNode)) { +const Decl *Callee = Call->getDirectCallee(); -

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:236 +- Fixed a false positive in :doc:`bugprone-branch-clone + ` when the branches ishaangandhi wrote: > Eugene.Zelenko wrote: > > Eugene.Zelenko wrote: > > > ishaangandh

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:236 +- Fixed a false positive in :doc:`bugprone-branch-clone + ` when the branches ishaangandhi wrote: > Eugene.Zelenko wrote: > > ishaangandhi wrote: > > > Eugene.Zelenk

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:236 +- Fixed a false positive in :doc:`bugprone-branch-clone + ` when the branches ishaangandhi wrote: > Eugene.Zelenko wrote: > > ishaangandhi wrote: > > > Eugene.Zelenk

[PATCH] D128401: [clang-tidy] Fixing a bug raising false alarms on static local variables in the Infinite Loop Checker

2022-06-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:160 + if (const auto *Call = dyn_cast(StmtNode)) { +const auto *Callee = Call->getDirectCallee(); + Please don't use `auto` when type is not spelled

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

2022-06-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:55 + +auto Methods = MemberCall->getRecordDecl()->methods(); +auto Clear = llvm::find_if(Methods, [](const CXXMethodDecl *F) { Please don't us

[PATCH] D126186: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values

2022-05-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:160 +- Made :doc:`cert-oop57-cpp ` more sensitive + by checking for an arbitrary expression in the second argument of `memset`. + Please use double back-ticks for language

[PATCH] D126880: [clang-tidy] Add cppcoreguidelines-avoid-const-or-ref-data-members check

2022-06-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.h:29 + void check(const ast_matchers::MatchFinder::MatchResult &Result) override; +}; + Please add `isLanguageVersionSupported`. =

[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 https://reviews.llvm.org/D144135/new

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

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

[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: clang-tools-extra/do

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

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

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

[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 &QType) { if (const ElaboratedType *ElType = QType->getAs()) { if (const Nest

[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 https://lists.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] 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 G

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

[PATCH] D138655: [clang-tidy] Fix `cppcoreguidelines-init-variables` for invalid vardecl

2022-11-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Will be good idea to add test for this situation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138655/new/ https://reviews.llvm.org/D138655 ___ cfe-commits mailing list c

[PATCH] D138655: [clang-tidy] Fix `cppcoreguidelines-init-variables` for invalid vardecl

2022-11-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be better to expand existing `init-variables.cpp` test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138655/new/ https://reviews.llvm.org/D138655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D138777: [clang-tidy] Add check bugprone-multiple-new-in-one-expression.

2022-11-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/MultipleNewInOneExpressionCheck.h:25 + bool isLanguageVersionSupported(const LangOptions &LangOpts) const override { +return LangOpts.CPlusPlus11; + } I think check is

[PATCH] D76818: [clang-tidy] Add check llvmlibc-implementation-in-namespace.

2020-03-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please also add isLanguageVersionSupported(), because namespaces make sense only in C++. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76818/new/ https://reviews.llvm.org/D76818 __

[PATCH] D73580: [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks section

2020-02-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D73580#1883861 , @njames93 wrote: > LGTM, For what this is trying to achieve I have no issue, follow up patches > can be submitted for the other enhancements needed. Please commit patch if you'll have time. See summary

[PATCH] D75134: [clang-tidy] Improved renamer check logic

2020-02-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be reasonable to have script to create check alias, but this could be made in separate patch. Comment at: clang-tools-extra/clang-tidy/add_new_check.py:17 import sys - -# Adapts the module's CMakelist file. Returns 'True' if it could add

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D74669#1892577 , @jroelofs wrote: > Implement review feedback: > > - Re-purpose `HeaderFileExtensionsUtils.h` to support headers *and* sources. > - Surround file extension in diagnostic with `''`s. > > I have these as two

[PATCH] D75134: [clang-tidy] Improved renamer check logic

2020-02-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be reasonable to find out what are naming conventions for Python in LLVM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75134/new/ https://reviews.llvm.org/D75134

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Will be good idea to make callers function list configurable through option. See other checks as example. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.cpp:20 +void SignalInMultithreadedProgramCheck::regist

[PATCH] D66564: [clang-tidy] new altera struct pack align check

2020-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D66564#1895916 , @aaron.ballman wrote: > Are you aware of plans that you or others have for adding additional checks > to the new `altera` module? There are several patches for `altera` module already. CHANGES SINCE

[PATCH] D72235: [clang-tidy] new altera unroll loops check

2020-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please rebase from master. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72235/new/ https://reviews.llvm.org/D72235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Language and/or its standard is checked in other places too. Should all similar places be refactored? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75289/new/ https://reviews.llvm.org/D75289 _

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D75289#1896925 , @njames93 wrote: > In D75289#1896902 , @Eugene.Zelenko > wrote: > > > Language and/or its standard is checked in other places too. Should all > > similar places

[PATCH] D75332: [clang-tidy] Add module for llvm-libc and restrict-system-libc-header-check.

2020-02-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new module in docs/clang-tidy/index.rst and Release Notes (new modules section is above new checks one and please add subsubsection). Comment at: clang-tools-extra/clang-tidy/llvmlibc/LLVMLibcTidyModule.cpp:21 + void addCheckFact

[PATCH] D75492: [clang-tidy]: modernize-use-using: don't diagnose typedefs in `extern "C"` DeclContexts

2020-03-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. See also https://llvm.org/PR35924. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75492/new/ https://reviews.llvm.org/D75492 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D75332: [clang-tidy] Add module for llvm-libc and restrict-system-libc-header-check.

2020-03-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/llvmlibc-restrict-system-libc-headers.rst:18 +lead to subtle and hard to detect bugs. For example consider a system libc +whose `dirent` struct has slightly different field ordering than l

[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

2020-03-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:104 + + Finds methods marked unavailable that do not override any method from a + superclass. Please synchronize with first statement in documentation.

[PATCH] D72235: [clang-tidy] new altera unroll loops check

2020-03-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp:41 + } + if (Unroll == PartiallyUnrolled) { +return; Please elide braces. Comment at: clang-tools-extra/clang-tidy/altera/UnrollLoo

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2019-10-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. @aaron.ballman: Please move Release Notes entry to new checks section (in alphabetical order). Currently it's located in //Improvements to include-fixer//. Please also close PR. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2019-10-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D55793#1727437 , @aaron.ballman wrote: > In D55793#1727423 , @Eugene.Zelenko > wrote: > > > @aaron.ballman: Please move Release Notes entry to new checks section (in > > alphabe

[PATCH] D69855: [clang-tidy] Fix llvm-namespace-comment for macro expansions

2019-11-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp:226 .str(); + } else if (Comment.startswith("//")) { Is this empty line necessary? Repository: rG LLVM Github Monorepo C

[PATCH] D70052: [clang-tidy] Add misc-mutating-copy check

2019-11-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. If this is CERT rule, why check is not placed in relevant module? Comment at: clang-tools-extra/docs/ReleaseNotes.rst:126 + + Finds copy operations that mutate the source object. + Please synchronize with first statement in docu

[PATCH] D69548: Give clang-tidy readability-redundant-string-init a customizable list of string types to fix

2019-11-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-redundant-string-init.rst:30 +Semicolon-delimited list of base class names to apply this check to. +By default `::std::basic_string` applies to std::string and std::wst

[PATCH] D70052: [clang-tidy] Add misc-mutating-copy check

2019-11-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D70052#1741246 , @gbencze wrote: > In D70052#1740235 , @Eugene.Zelenko > wrote: > > > If this is CERT rule, why check is not placed in relevant module? > > > To be honest I was ho

[PATCH] D70094: [clang-tidy] new altera ID dependent backward branch check

2019-11-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/altera/IdDependentBackwardBranchCheck.cpp:106 +if (auto *ChildExpression = dyn_cast(*i)) { + auto Result = hasIdDepVar(ChildExpression); + if (Result) { Please don't use auto when type is

[PATCH] D70355: [clang-format] [NFC] add recent changes to release notes

2019-11-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. General comments: - Isn't //Option(s) ... was/were added// or //Option(s) ... had been added// are more correct from from point of view of English grammar? Same for older entries. - It'll be great to nag developers to expand Release Notes when relevant code chan

[PATCH] D70368: [clang-tidy] Rewrite modernize-avoid-bind check

2019-11-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please describe changes in documentation and Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70368/new/ https://reviews.llvm.org/D70368 ___ cfe-commits mail

[PATCH] D70390: [clang-tidy] new performance-no-automatic-move check.

2019-11-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:143 + + The check flags constructs that prevent automatic move of local variables. + Please omit //The check// and synchronize with first sentence of documentation. =

[PATCH] D70368: [clang-tidy] Rewrite modernize-avoid-bind check

2019-11-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Changes should be also reflected in Release Notes. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize-avoid-bind.rst:7 +The check finds uses of ``std::bind`` and ``boost::bind`` and replaces them +with lambdas. Lambdas will use value

[PATCH] D70368: [clang-tidy] Rewrite modernize-avoid-bind check

2019-11-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:194 + The check now supports supports diagnosing and fixing arbitrary callables instead of + only simple free functions. The ``PermissiveParameterList`` option has also been + added to

[PATCH] D70368: [clang-tidy] Rewrite modernize-avoid-bind check

2019-11-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mark addressed comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70368/new/ https://reviews.llvm.org/D70368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D70094: [clang-tidy] new altera ID dependent backward branch check

2019-11-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/altera/IdDependentBackwardBranchCheck.cpp:115 +IdDependentBackwardBranchCheck::hasIdDepField(const Expr *Expression) { + if (const MemberExpr *MemberExpression = dyn_cast(Expression)) { +const FieldDecl *CheckField

[PATCH] D70823: [clang-tidy] Adding cert-pos34-c check

2019-11-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:200 + + Finds calls of 'putenv' function with automatic variable as the argument. + Please use double back-ticks to highlight putenv. Repository: rCTE Clang Tools Extra

[PATCH] D70876: [clang-tidy] Add spuriously-wake-up-functions check

2019-12-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I don't think that //misc// module should be used when checks belong to //cert// Comment at: clang-tools-extra/clang-tidy/misc/SpuriouslyWakeUpFunctionsCheck.cpp:77 +const MatchFinder::MatchResult &Result) { + + const auto *MatchedWait = Re

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return-type check

2019-12-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please take a look on PR44206. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56160/new/ https://reviews.llvm.org/D56160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[PATCH] D71001: [Clang-Tidy] New check: bugprone-misplaced-pointer-arithmetic-in-alloc

2019-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. What about new operator? May be check should have option for custom allocators? Comment at: clang-tools-extra/docs/ReleaseNotes.rst:207 +- New :doc:`bugprone-misplaced-pointer-arithmetic-in-alloc + ` check. Please move to new

[PATCH] D71001: [Clang-Tidy] New check: bugprone-misplaced-pointer-arithmetic-in-alloc

2019-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. > ASan can help debug this issue, and more. This is dynamic analysis, and detection of problem depends on test case. Detection of such problem during static analysis makes sense. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D71001: [Clang-Tidy] New check: bugprone-misplaced-pointer-arithmetic-in-alloc

2019-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D71001#1768964 , @baloghadamsoftware wrote: > In D71001#1768704 , @Eugene.Zelenko > wrote: > > > What about new operator? May be check should have option for custom > > allocato

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return-type check

2019-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D56160#1769107 , @bernhardmgruber wrote: > @Eugene.Zelenko I tried to find what you refer to by PR44206, but I could not > find anything :/ Can you please provide me with a link? Thank you! See https://bugs.llvm.org/s

[PATCH] D71001: [Clang-Tidy] New check: bugprone-misplaced-pointer-arithmetic-in-alloc

2019-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D71001#1769382 , @gribozavr2 wrote: > In D71001#1769071 , > @baloghadamsoftware wrote: > > > In D71001#1769018 , @gribozavr2 > > wrote: >

[PATCH] D71001: [Clang-Tidy] New check: bugprone-misplaced-pointer-arithmetic-in-alloc

2019-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D71001#1769429 , @gribozavr2 wrote: > In D71001#1769394 , @Eugene.Zelenko > wrote: > > > With such logic, Clang-tidy is maintenance burden: 368 unaddressed request > > in Bugzill

[PATCH] D71174: [clang-tidy] new check: bugprone-signed-char-misuse

2019-12-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.cpp:22 +namespace { +Matcher hasAnyListedName(const std::string &Names) { + const std::vector NameList = Please use static for functions. See LLVM Codin

[PATCH] D71174: [clang-tidy] new check: bugprone-signed-char-misuse

2019-12-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.cpp:21 + +namespace { +static Matcher hasAnyListedName(const std::string &Names) { Anonymous namespace is not needed anymore. Repository: rG LLVM Git

[PATCH] D71199: [clang-tidy] New check readability-prefer-initialization-list

2019-12-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Clang-tidy also has //modernize-use-default-member-init//. Will be good idea to mention this check in documentation and otherwise as well as draw distinction (C++ version, coding guidelines, etc) in use cases. Comment at: clang-tools-extra/cla

[PATCH] D71199: [clang-tidy][WIP] New check readability-prefer-initialization-list

2019-12-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. > This check is to enforce C++ core guideline C.49 while the modernize check > enforces guideline C.48. The two must be synchronized, and I think that this > new check should do that: for initializations that should be done using > in-class initializers accordin

[PATCH] D71607: [clang-tidy] Add unsigned subtraction warning, with suggestion to convert to unsigned literals.

2019-12-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please add documentation and mention new check in Release Notes. Comment at: clang-tools-extra/clang-tidy/bugprone/UnsignedSubtractionCheck.cpp:10 +#include "UnsignedSubtractionCheck.h" + +#include "../utils/Matchers.h" Unnecess

<    2   3   4   5   6   7   8   9   10   >