[PATCH] D141000: [clang-tidy] Introduce HeaderFileExtensions option

2023-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Looks OK for me, but probably will be good idea to remove check-specific options in same commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141000/new/ https://reviews.llvm.org/D141000

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

2023-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/StrlenStringCStrCheck.cpp:1 +//===- StrlenStringCStrCheck.cpp - Check for strlen(string::c_str()) calls +//-===// Please make it single string.

[PATCH] D140894: [clang-tidy] Don't emit misc-unused-using-decl warnings for header files.

2023-01-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc/unused-using-decls.rst:26 + A semicolon-separated list of filename extensions of header files (the filename + extensions should not include "." prefix). Default is

[PATCH] D140894: [clang-tidy] Don't emit misc-unused-using-decl warnings for header files.

2023-01-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc/unused-using-decls.rst:26 + A semicolon-separated list of filename extensions of header files (the filename + extensions should not include "." prefix). Default is

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-reference-coroutine-parameters.rst:9 + +This check implements +[CppCoreGuideline CP.53](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines).

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

2022-12-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D140760#4019708 , @ccotter wrote: > In D140760#4019680 , > @Eugene.Zelenko wrote: > >> I just look into check documentation, new feature should be described with >> example

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

2022-12-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I just look into check documentation, new feature should be described with example there too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760

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

2022-12-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be good idea to mention change in Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760 ___ cfe-commits mailing

[PATCH] D140290: [clang-tidy] Add misc-static-declaration-in-header check

2022-12-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc/static-declaration-in-header.rst:39 + A semicolon-separated list of filename extensions of header files (the filename + extensions should not include "." prefix). Default is

[PATCH] D140290: [clang-tidy] Add misc-static-declaration-in-header check

2022-12-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/StaticDeclarationInHeaderCheck.cpp:46 +: ClangTidyCheck(Name, Context), + RawStringHeaderFileExtensions(Options.getLocalOrGlobal( + "HeaderFileExtensions",

[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

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

[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 ) const override { +return LangOpts.CPlusPlus11; + } I think check is

[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

[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

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

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

[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] 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()) {

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

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

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

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

2022-10-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D128372#3883214 , @denik wrote: > @Eugene.Zelenko , could you please stamp the patch if you don't have any > other concerns? Please wait for developers approval. I look only for trivial issues. Repository: rG LLVM

[PATCH] D134588: [clang-tidy] Fix bugprone-exception-escape warn on noexcept calls

2022-10-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Will be good idea to mention changes in Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134588/new/ https://reviews.llvm.org/D134588 ___ cfe-commits mailing

[PATCH] D136224: [clang-tidy] Skip private default ctors in modernize-use-equals-default

2022-10-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:161 since they cannot be explicitly defaulted. The check also skips copy assignment operators - with nonstandard return types. The check is restricted to c++11-or-later. + with

[PATCH] D136224: [clang-tidy] Skip private default ctors in modernize-use-equals-default

2022-10-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:161 since they cannot be explicitly defaulted. The check also skips copy assignment operators - with nonstandard return types. The check is restricted to c++11-or-later. + with

[PATCH] D118743: [clang-tidy] Add `modernize-use-inline-const-variables-in-headers` check

2022-10-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize/use-inline-const-variables-in-headers.rst:5 +=== + + Excessive newline. Repository: rG LLVM Github Monorepo

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2022-10-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:68 + + auto BPointeeUQTy = BPointeeTy->getUnqualifiedDesugaredType(); + auto TPointeeUQTy = TPointeeTy->getUnqualifiedDesugaredType(); Please

[PATCH] D135476: [clang-tidy] Support concepts in `bugprone-forwarding-reference-overload`

2022-10-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a subscriber: MyDeveloperDay. Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/forwarding-reference-overload.rst:54 constructor could hide in this case. We also suppress warnings for constructors -like C3

[PATCH] D135476: [clang-tidy] Support concepts in `bugprone-forwarding-reference-overload`

2022-10-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/forwarding-reference-overload.rst:54 constructor could hide in this case. We also suppress warnings for constructors -like C3 and C4 that are guarded with an ``enable_if``,

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Thank you! Just wanted to ensure alphabetical order in `Changes in existing checks` :-) Fine to merge. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130130/new/ https://reviews.llvm.org/D130130 ___

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Could you please rebase from `main` and upload patch here before commit? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130130/new/ https://reviews.llvm.org/D130130 ___ cfe-commits mailing list

[PATCH] D134588: [clang-tidy] Fix bugprone-exception-escape warn on noexcept calls

2022-09-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be good idea to mention change in Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134588/new/ https://reviews.llvm.org/D134588 ___ cfe-commits mailing

[PATCH] D134592: [clang-tidy] Add option to control floating point binary operators in readability-simplify-boolean-expr

2022-09-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:155 + + Added an option SafeFloatComparisons to control negating binary operators + with floating point operands. Please enclose `SafeFloatComparisons` into single

[PATCH] D133244: [clang-tidy] Readability-container-data-pointer adds new option to ignore Containers

2022-09-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/container-data-pointer.cpp:1 -// RUN: %check_clang_tidy %s readability-container-data-pointer %t -- -- -fno-delayed-template-parsing +// RUN: %check_clang_tidy %s

[PATCH] D133244: [clang-tidy] Readability-container-data-pointer adds new option to ignore Containers

2022-09-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:146 + + The check now skips containers that are defined in the option IgnoredContainers. The default value is ::std::array. + Please highlight option name and value with

[PATCH] D133244: [clang-tidy] Readability-container-data-pointer adds new option to ignore Containers

2022-09-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention changes in Release Notes and add test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133244/new/ https://reviews.llvm.org/D133244 ___ cfe-commits

[PATCH] D131939: [clang-tidy] Add performance-expensive-flat-container-operation check

2022-08-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I got notification. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131939/new/ https://reviews.llvm.org/D131939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D132804: [clang-tidy] Add option to ignore CRTP overrides in convert-member-functions-to-static

2022-08-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/convert-member-functions-to-static.rst:23 + warning will be emitted. Often occurs with CRTP like classes. + For the case below a warning would only be emitted for

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-do-while.rst:6 + +This check warns when using ``do-while`` loops. They are less readable than +plain ``while`` loops since the termination condition is at the end

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

2022-08-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:127 + + Warns when `empty()` is used on a range and the result is ignored. Suggests `clear()` as an alternative + if it is an existing member function. Please

[PATCH] D132294: [clang-tidy] Add check of sprintf with fixed size buffer

2022-08-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/sprintf-with-fixed-size-buffer.rst:6 + +Find usage of ``sprintf``, which write output string into a fixed-size array. It +will suggest ``snprintf`` instead.

[PATCH] D132294: [clang-tidy] Add check of sprintf with fixed size buffer

2022-08-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SprintfWithFixedSizeBufferCheck.h:29 + void check(const ast_matchers::MatchFinder::MatchResult ) override; +}; + Yoorkin wrote: > Eugene.Zelenko wrote: > > Please add

[PATCH] D132294: [clang-tidy] Add check of sprintf with fixed size buffer

2022-08-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SprintfWithFixedSizeBufferCheck.cpp:13 +#include "clang/ASTMatchers/ASTMatchFinder.h" + +#include "clang/Lex/Lexer.h" Unnecessary newline. Comment at:

[PATCH] D132290: [clang-tidy] Skip unions in use-equals-default

2022-08-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention changes in Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132290/new/ https://reviews.llvm.org/D132290 ___ cfe-commits mailing list

[PATCH] D131985: clang-tidy: strip useless parens from `return` statements

2022-08-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D131985#3727544 , @oleg.smolsky wrote: > In D131985#3727436 , @njames93 > wrote: > >> The idea of this check is good, but restricting it to only return statements >> seems

[PATCH] D131985: clang-tidy: strip useless parens from `return` statements

2022-08-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:110 + + Checks for `return` statements with redundant parenthesis. + Please use double back-ticks for language constructs. CHANGES SINCE LAST ACTION

[PATCH] D131985: clang-tidy: strip useless parens from `return` statements

2022-08-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Entry in Release Notes is still missing. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/return-with-redundant-parens.rst:4 +readability-return-with-redundant-parens += + Please make

[PATCH] D131985: clang-tidy: strip useless parens from `return` statements

2022-08-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please add documentation and mention new check in Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131985/new/ https://reviews.llvm.org/D131985 ___

[PATCH] D131859: [clang-tidy] Adds QualifierAlignment to misc-const-correctness.

2022-08-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Shouldn't `east/west` added as aliases? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131859/new/ https://reviews.llvm.org/D131859 ___ cfe-commits mailing list

[PATCH] D131780: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

2022-08-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D131780#3720896 , @carlosgalvezp wrote: > In D131780#3719881 , > @Eugene.Zelenko wrote: > >> Please mention changes in Release Notes. > > Thanks for the quick review,

[PATCH] D131780: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

2022-08-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention changes in Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131780/new/ https://reviews.llvm.org/D131780 ___ cfe-commits mailing list

[PATCH] D131517: [clang-tidy] readability-implicit-bool-conversion: support implicit conversion to std::optional

2022-08-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention changes in Release Notes and add test case, but don't rely on STL implementation, see other tests as example for mock implementations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131517/new/

[PATCH] D131319: [clang-tidy] Update llvm-prefer-isa-or-dyn-cast-in-conditionals with new syntax

2022-08-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:110 + ` check to + use the `*and_present` and `*if_present` templates added in + `D123901 `_. Please use double back-ticks.

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-08-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:99 +- The :doc:`readability-avoid-const-params-in-decls + ` check does not Please move it to `Changes in existing checks` section. CHANGES SINCE LAST ACTION

[PATCH] D130630: [clang-tidy] Add readability-nested-ifs check

2022-07-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/nested-ifs.rst:58 + } + Excessive newline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130630/new/

[PATCH] D130181: [clang-tidy] Add readability-use-early-exits check

2022-07-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/use-early-exits.rst:52 + many lines. Default value is `10`. \ No newline at end of file Please add newline. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-07-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention changes in Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130130/new/ https://reviews.llvm.org/D130130 ___ cfe-commits mailing list

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

2022-07-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:146 +CXXRecordDecl *ArgRecordDecl = Arg->getType()->getAsCXXRecordDecl(); +if (ArgRecordDecl == NULL) + return; `nullptr`. Repository:

[PATCH] D128861: [clang-tidy] add cppcoreguidelines-symmetric-binary-operator

2022-06-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SymmetricBinaryOperatorCheck.h:29 + + bool isLanguageVersionSupported(const LangOptions ) const override; +}; This method is usually inlined. Repository: rG

[PATCH] D128861: [clang-tidy] add cppcoreguidelines-symmetric-binary-operator

2022-06-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please note that documentation and test locations were changed recently. Please rebase from `main` and make necessary changes. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SymmetricBinaryOperatorCheck.h:27 +public: +

[PATCH] D128697: [clang-tidy] Add new check `bugprone-unhandled-exception-at-sto`

2022-06-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to make check more generic and allow user-defined list of unsafe functions. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:135 +- New :doc:`bugprone-unhandled-exception-at-sto + ` check. Please

[PATCH] D91000: [clang-tidy] Add bugprone-unsafe-functions checker.

2022-06-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:148 +- New :doc:`bugprone-unsafe-functions ` check. + Please keep checks entries in alphabetical order. Comment at:

[PATCH] D91000: [clang-tidy] Add bugprone-unsafe-functions checker.

2022-06-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Locations for tests and check documentation was changed recently. Please rebase from `main` and adjust your code accordingly. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91000/new/ https://reviews.llvm.org/D91000

[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

[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

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

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

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

[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 ) { +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: > ishaangandhi wrote: > > Eugene.Zelenko wrote: > > >

[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

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

[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] 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 ) override; +}; + Please add `isLanguageVersionSupported`.

[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] D126247: `readability-indentifier-naming` resolution order and examples

2022-05-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-identifier-naming.rst:2747 +Resolution order +--- + Please make length same as title. Comment at:

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

2022-05-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:201 +- Made :doc:`cert-oop57-cpp ` more sensitive + by checking for non-zero integer literal memset arguments as well. Please sort entries in section alphabetically.

[PATCH] D126097: [clang-tidy] Adds the NSDateFormatter checker to clang-tidy

2022-05-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/NsdateformatterCheck.cpp:12 +#include "clang/ASTMatchers/ASTMatchFinder.h" +# include + `cctype`? See `modernize-deprecated-headers`. Comment at:

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnusedNoSideEffectCheck.cpp:135 +// or class, and that there are no side effects on `this`. +if (auto *Callee = dyn_cast(Call->getCallee())) { + markSideEffectFree(Callee);

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnusedNoSideEffectCheck.cpp:11 + +#include +#include C++ headers should be after application's ones. Comment at:

[PATCH] D124650: [clang-tidy] Simplify boolean expressions by DeMorgan's theorem

2022-04-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:139 +- Expanded :doc:`readability-simplify-boolean-expr + ` to simplify expressions Please use alphabetical order for such entries. Repository: rG LLVM Github

[PATCH] D123655: [clang-tidy] Add portability-std-allocator-const-t check

2022-04-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/portability-std-allocator-const.rst:6 + +This check reports use of ``vector`` (and similar containers of const +elements). These are not allowed in standard C++, and should usually be

[PATCH] D123655: [clang-tidy] Add portability-std-allocator-const-t check

2022-04-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Shouldn't this check be enabled only when libstdc++ is used? Comment at: clang-tools-extra/docs/clang-tidy/checks/portability-std-allocator-const-t.rst:6 + +Per C++ ``[allocator.requirements.general]``: "T is any cv-unqualified object +type",

[PATCH] D121019: [clang-tools-extra] Document clang tidy unit tests target

2022-03-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/Contributing.rst:367 +You can build the Clang Tidy unit tests by building the ``ClangTidyTests`` target. +Test targets in LLVM and Clang are excluded from the "build all" style action of

[PATCH] D120385: [clang-tidy][run-clang-tidy.py] Mutual exclusion of -config and -config-file

2022-02-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. About procedure :-) You could not approve patches yourself, this is task for reviewers. If content of this patch will be merged to another one, just abandon this one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D120385: [clang-tidy][run-clang-tidy.py] Mutual exclusion of -config and -config-file

2022-02-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good to merge these changes to D120331 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120385/new/ https://reviews.llvm.org/D120385

[PATCH] D120385: [clang-tidy][run-clang-tidy.py] Mutual exclusion of -config and -config-file

2022-02-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py:239 help='Specify the path of .clang-tidy or custom config' - 'file: e.g. -config-file=/some/path/myTidyConfigFile' +

[PATCH] D119562: Provide fine control of color in run-clang-tidy

2022-02-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py:96 +start.append('--use-color') + elif use_color is not None: +start.append('--use-color=false') kesyog wrote: > Eugene.Zelenko wrote: > > Shouldn't it

[PATCH] D119562: Provide fine control of color in run-clang-tidy

2022-02-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py:96 +start.append('--use-color') + elif use_color is not None: +start.append('--use-color=false') Shouldn't it be just `else:`? Repository: rG LLVM

[PATCH] D118743: [clang-tidy] Add `modernize-use-inline-const-variables-in-headers` check

2022-02-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseInlineConstVariablesInHeadersCheck.h:33 +/// declarations in header files. True by default. +/// For the user-facing documentation see: +///

[PATCH] D118520: [clang-tidy] Output currently processing check and nodes on crash

2022-01-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Sure, this is important improvement. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118520/new/ https://reviews.llvm.org/D118520 ___ cfe-commits mailing list

[PATCH] D118520: [clang-tidy] Output currently processing check and nodes on crash

2022-01-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:191 + } + void setContext(const ASTContext ) { CurContext = } + void clearContext() { CurContext = nullptr; } Please separate with newline.

<    1   2   3   4   5   6   7   8   9   10   >