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

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

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

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

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

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

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

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

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

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

[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.

2022-01-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think this check belongs to `bugprone` module. How about `std::unique_ptr`? Comment at: clang-tools-extra/clang-tidy/misc/SharedPtrArrayMismatchCheck.cpp:1 +//===--- SharedPtrArrayMismatchCheck.cpp - clang-tidy +//--===//

[PATCH] D117205: [clang-tidy] Support custom fix hint for cppcoreguidelines-pro-bounds-constant-array-index

2022-01-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:156 +- Add new option ``cppcoreguidelines-pro-bounds-constant-array-index.FixHint`` + to allow users to specify a different fix hint than ``gsl::at``. carlosgalvezp

[PATCH] D117205: [clang-tidy] Support custom fix hint for cppcoreguidelines-pro-bounds-constant-array-index

2022-01-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:156 +- Add new option ``cppcoreguidelines-pro-bounds-constant-array-index.FixHint`` + to allow users to specify a different fix hint than ``gsl::at``. Please sort checks

[PATCH] D116875: [clang-tidy] Add performance-inefficient-array-traversal check

2022-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/InefficientArrayTraversalCheck.cpp:63 +hasLHS(ToDecl), +hasRHS(integerLiteral(equals(1)), +

[PATCH] D116875: [clang-tidy] Add performance-inefficient-array-traversal check

2022-01-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/InefficientArrayTraversalCheck.cpp:59 + // TODO: Add support for x [+-]= 1 and x = x [+-] 1 + hasIncrement(unaryOperator(hasUnaryOperand(ToDecl), +

[PATCH] D116577: [clang-tidy] Added "boost-use-range-based-for-loop" check

2022-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/boost/UseRangeBasedForLoopCheck.cpp:60 + +auto Loc = MacroNameToken.getLocation(); +auto Diag = Check->diag(Loc, "use range-based for loop instead of %0") Please specify type

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:141 ^^ +- Added a setting ``bugprone-assert-side-effect.FunctionExceptions`` for + a comma-separated list of the names of functions or methods to be considered

[PATCH] D7982: Add readability-duplicate-include check to clang-tidy

2022-01-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Functionality-wise this check is superseded by Include What You Use . Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-duplicate-include.rst:6 + +Looks for duplicate

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:141 ^^ +- Added a setting ``bugprone-assert-side-effect.FunctionExceptions`` for + a comma-separated list of the names of functions or methods to be considered

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new option in Release Notes (in changes in existing checks section). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 ___ cfe-commits mailing list

[PATCH] D114602: [clang-tidy] Improve documentation of bugprone-unhandled-exception-at-new [NFC]

2021-11-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-exception-at-new.rst:31 + + + Two excessive newlines. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D113946: [libc][clang-tidy] fix namespace check for externals

2021-11-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp:13 +#include + Should be `` and without newline separation form rest of headers. Comment at:

[PATCH] D113848: [clang-tidy][NFC] Refactor ClangTidyDiagnosticConsumer files

2021-11-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyContext.cpp:40 +#include +using namespace clang; +using namespace tidy; Shouldn't namespaces be used instead? Comment at:

[PATCH] D113201: [clang-tidy] Fix a crash in modernize-loop-convert around conversion operators

2021-11-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please wait for @aaron.ballman approval. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113201/new/ https://reviews.llvm.org/D113201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D112881: [clang-tidy] Allow disabling integer to floating-point narrowing conversions for cppcoreguidelines-narrowing-conversions

2021-11-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention improvement in Release Notes, in `Changes in existing checks` section. See example . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-err33-c.rst:7 +Warns on unused function return values. +This check corresponds to (a part of) CERT C Coding Standard rule `ERR33-C. +Detect and handle standard library errors

[PATCH] D111623: [clang-tidy] Update documentation of check bugprone-unused-return-value [NFC].

2021-10-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unused-return-value.rst:16 + By default the following functions are checked: + ``std::async, std::launder, std::remove, std::remove_if, std::unique, +

[PATCH] D111208: [clang-tidy] Support globbing in NOLINT* expressions

2021-10-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:72 + multiple warnings in the same line. - Added support for `NOLINTBEGIN` ... `NOLINTEND` comments to suppress Clang-Tidy warnings over multiple lines. Please

[PATCH] D108893: clang-tidy: introduce readability-containter-data-pointer check

2021-09-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. > So you'd like to see that extra functionality added now? (I don't think it > makes sense to have the check as-is in both `readability` and `modernize`.) There are plenty of other cross-module aliases

[PATCH] D108893: clang-tidy: introduce readability-containter-data-pointer check

2021-09-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D108893#2999654 , @aaron.ballman wrote: > In D108893#2999645 , > @Eugene.Zelenko wrote: > >> What about adding `modernize`/`bugprone` aliases? > > I'd be fine if we wanted to

[PATCH] D108893: clang-tidy: introduce readability-containter-data-pointer check

2021-09-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. What about adding `modernize`/`bugprone` aliases? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108893/new/ https://reviews.llvm.org/D108893 ___ cfe-commits mailing list

[PATCH] D108893: clang-tidy: introduce readability-containter-data-pointer check

2021-08-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D108893#2972634 , @compnerd wrote: > @Eugene.Zelenko I'd like to have @aaron.ballman weigh in on the naming, and > assuming that he's okay with `modernize.container-data-pointer`, I'll change > it to that. Sure,

[PATCH] D108893: clang-tidy: introduce readability-containter-data-pointer check

2021-08-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:87 + + Finds cases where code could use ``data`` rather than the address of an element. + It'll be good idea to mention containers and that `data` is method.

[PATCH] D108893: clang-tidy: introduce readability-containter-data-pointer check

2021-08-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ContainerDataPointerCheck.cpp:18 +namespace tidy { +namespace readability { +ContainerDataPointerCheck::ContainerDataPointerCheck(StringRef Name, compnerd wrote: >

[PATCH] D108893: clang-tidy: introduce readability-containter-data-pointer check

2021-08-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Thank you for implementing 26817 ! But shouldn't this check belong to `modernize` module? Please add documentation and mention new check in Release Notes. Comment at:

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/ConstParameterValueOrRef.cpp:57 +namespace { +bool isSharedPtr(const QualType ) { + if (auto R = T->getAsCXXRecordDecl()) Please use `static`, not anonymous namespace

[PATCH] D104112: [clang-tidy] cppcoreguidelines-avoid-init-default-constructors: a new check

2021-06-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. What about bit filed members - their initialization is supported only in C++20. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104112/new/ https://reviews.llvm.org/D104112

[PATCH] D104112: [clang-tidy] cppcoreguidelines-avoid-init-default-constructors: a new check

2021-06-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidInitDefaultConstructorsCheck.h:28 + bool isLanguageVersionSupported(const LangOptions ) const override { +return LangOpts.CPlusPlus; + } Shouldn't this

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-06-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Frankly, I don't think that length-based criteria is reasonable one. Readability of code is much more important than line/file length. Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:633 + if

[PATCH] D102576: [clang-tidy] cppcoreguidelines-avoid-do-while: a new check

2021-05-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:114 + + Checks if a do-while loop exists and flags it. + Please highlight do-while with double back-ticks. Comment at:

[PATCH] D102325: [clang-tidy] cppcoreguidelines-virtual-base-class-destructor: a new check

2021-05-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualBaseClassDestructorCheck.cpp:22 +void VirtualBaseClassDestructorCheck::registerMatchers(MatchFinder *Finder) { + ast_matchers::internal::Matcher inheritsVirtualMethod = +

[PATCH] D102325: [clang-tidy] cppcoreguidelines-virtual-base-class-destructor: a new check

2021-05-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualBaseClassDestructorCheck.cpp:38 + + const auto Destructor = MatchedClassOrStruct->getDestructor(); + Please don't use auto unless type is spelled in same

[PATCH] D101787: [clang-tidy] Aliasing: Add more support for lambda captures.

2021-05-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Aliasing.cpp:76 +const VarDecl *Var) { + const CXXMethodDecl *MD = dyn_cast(Func); + if (!MD) `const auto*` could be used

[PATCH] D100092: [clang-tidy] cppcoreguidelines-declare-loop-variable-in-the-initializer: a new check

2021-04-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/DeclareLoopVariableInTheInitializerCheck.cpp:37 + bool VisitDeclRefExpr(DeclRefExpr *D) { +if (const VarDecl *To = dyn_cast(D->getDecl())) { + if (To == MatchedDecl &&

[PATCH] D101471: [clang-tidy] Add proper emplace checks to modernize-use-emplace

2021-04-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp:29 + int Count = 0; + for (const auto : FullName) { +if (Character == '<') { I'm not sure, but probably braces could be elided in `for` and `if

[PATCH] D101471: [clang-tidy] Add proper emplace checks to modernize-use-emplace

2021-04-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mark fixed suggestions as done. Comment at: clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp:248 + const auto *Call = PushBackCall ? PushBackCall : EmplacyCall; + Please don't use auto unless type is spelled

[PATCH] D101471: [clang-tidy] Add proper emplace checks to modernize-use-emplace

2021-04-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp:25 + Names) { + const auto FullName = "::" + Node.getQualifiedNameAsString(); + Please don't use auto unless type is spelled explicitly in

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

2021-04-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.cpp:1 +//===--- IdDependentBackwardBranchCheck.cpp - clang-tidy *- C++ -*-===// +// `*- C++ -*` is not necessary for `.cpp` files.

[PATCH] D100092: [clang-tidy] cppcoreguidelines-declare-loop-variable-in-the-initializer: a new check

2021-04-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/DeclareLoopVariableInTheInitializerCheck.cpp:28 + + diag(MatchedForStmt->getBeginLoc(), + "Prefer to declare a loop variable in the initializer part of a "

[PATCH] D99993: [clang-tidy] bugprone-argument-comment: ignore name mismatches for decls from system headers

2021-04-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Why `--header-filter` command line option or `HeaderFilterRegex` configuration file option could not solve this problem? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D3/new/ https://reviews.llvm.org/D3

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

2021-04-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.cpp:200 + if (isa(Loop)) +return DO_LOOP; // loop_type = 0; + else if (isa(Loop)) Is loop ID is not enough? Why does comment with

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

2021-04-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/altera-id-dependent-backward-branch.rst:9 + +Based on the `Altera SDK for OpenCL: Best Practices Guide

[PATCH] D99646: [clang-tidy] misc-std-stream-objects-outside-main: a new check

2021-03-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/StdStreamObjectsOutsideMainCheck.h:30 +return LangOpts.CPlusPlus; + }; + Semicolon is not needed and should cause `-Wextra-semi` warnings. Repository: rG LLVM Github

[PATCH] D99646: [clang-tidy] misc-std-stream-objects-outside-main: a new check

2021-03-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It looks like new patch was not uploaded. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99646/new/ https://reviews.llvm.org/D99646 ___ cfe-commits mailing list

[PATCH] D99646: [clang-tidy] misc-std-stream-objects-outside-main: a new check

2021-03-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/StdStreamObjectsOutsideMainCheck.cpp:61 +} // namespace clang \ No newline at end of file Please add newline. Comment at:

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges

2021-03-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:78 +- libToolingCore and Clang-Tidy was refactored and now checks can produce + highlights (``^`` under fragments of the source code) in diagnostics. + Existing and new checks in the

[PATCH] D97960: [clang-tidy] bugprone-signal-handler improvements: display call chain

2021-03-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think call stack may be useful for other checks too. May be code should be moved to utilities? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97960/new/ https://reviews.llvm.org/D97960

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

2021-03-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/altera-unroll-loops.rst:15 + +- This check is unable to determine the number of iterations in a `while` or + `do..while` loop; hence if such a loop is fully unrolled, a note is emitted

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-03-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-variable-length.rst:21 + +Loop counter variables are expected to have a length of at least +`MinimumLoopCounterNameLength` characters (default is `2`).

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-03-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-variable-length.rst:9 + +Loop counter variables are expected to have a length of at least +`MinimumLoopCounterNameLength` characters (default is 2). Additionally, `i`,

[PATCH] D97683: [clang-tidy] Add include to misc-uniqueptr-reset-release

2021-03-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp:22 +: ClangTidyCheck(Name, Context), + Inserter(Options.getLocalOrGlobal("IncludeStyle", +

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-02-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-uniqueptr-delete-release.rst:24 + + If ``true``, refactor by calling the reset member function instead of + assigning to ``nullptr``. Default value is ``false``.

[PATCH] D97361: [clang-tidy] Add readability-redundant-using check

2021-02-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D97361#2589673 , @balazske wrote: > You can look into **misc/UnusedUsingDeclsCheck.cpp** (if not done yet), that > check handles `using` too. And that check is related to this check, the > module should be the same too

[PATCH] D97491: [clang-tidy] Deprecate readability-deleted-default check

2021-02-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D97491#2589097 , @njames93 wrote: > In D97491#2588835 , @Eugene.Zelenko > wrote: > >> If `Wdefaulted-function-deleted` was introduced in 12.0, I think it's safe >> just to

[PATCH] D97491: [clang-tidy] Deprecate readability-deleted-default check

2021-02-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. If `Wdefaulted-function-deleted` was introduced in 12.0, I think it's safe just to remove `readability-deleted-default`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97491/new/ https://reviews.llvm.org/D97491

[PATCH] D97361: [clang-tidy] Add misc-redundant-using check

2021-02-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think this check belongs to `readability` module. Comment at: clang-tools-extra/clang-tidy/misc/RedundantUsingCheck.cpp:1 +//===--- RedundantUsingCheck.cpp - clang-tidy +//===// Please make

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-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-easily-swappable-parameters.rst:89 +warning about the two parameters are silenced. +Defaults to ``1``. +Might be any positive integer. whisperity

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-02-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new option in Release Notes. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-easily-swappable-parameters.rst:89 +warning about the two parameters are silenced. +Defaults to ``1``. +Might be any positive

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-02-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:73 + +New checks +^^ Please rebase from trunk. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:79 + +Finds calls to ``new`` that may throw

[PATCH] D96719: [clang-tidy] Add new check 'bugprone-thread-canceltype-asynchronous' and alias 'cert-pos47-c'.

2021-02-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:70 -The improvements are... +- New :doc:`bugprone-thread-canceltype-asynchronous + ` check. Please add subsections for new checks and aliases. Looks like they were

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp:19 +AST_MATCHER(Decl, isInExternC) { + return Node.getDeclContext()->isExternCContext(); This matcher may be useful for other checks, for example,

[PATCH] D96607: [clang-tidy] Add check 'readability-pointer-type-star-placement'.

2021-02-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think it'll be much more reasonable to use `clang-format` and filter its output to select only changes with stars in build rule. `clang-format-diff` is another method to introduce formatting changes gradually. Comment at:

[PATCH] D96082: [clang-tidy] Add 'readability-useless-return-value' check

2021-02-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D96082#2544778 , @steveire wrote: > @Eugene.Zelenko Why did you remove me from the reviewers list? Only project's maintainers should be reviewers and approve patch. Sure, nobody prevents you from making comments.

[PATCH] D96082: [clang-tidy] Add 'readability-useless-return-value' check

2021-02-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. New check must be mentioned in Release Notes. Comment at: clang-tools-extra/clang-tidy/readability/UselessReturnValueCheck.cpp:1 +//===--- UselessReturnValueCheck.cpp - clang-tidy +//---===// Please

[PATCH] D94622: [clang-tidy] add concurrency-async-no-new-threads

2021-01-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D94622#2509323 , @segoon wrote: > Eugene.Zelenko, njames93, any comments on the patch? Sorry, you need to wait for approval from one of maintainers mentioned as reviewers. I check only documentation and for minor code

[PATCH] D94621: [clang-tidy] add concurrency-async-fs

2021-01-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D94621#2509324 , @segoon wrote: > Eugene.Zelenko, njames93, any comments on the patch? Sorry, you need to wait for approval from one of maintainers mentioned as reviewers. I check only documentation and for minor code

[PATCH] D93940: [clang-tidy] Add a check for blocking types and functions.

2021-01-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D93940#2509325 , @segoon wrote: > Eugene.Zelenko, njames93, any comments on the patch? Sorry, you need to wait for approval from one of maintainer mentioned as reviewers. I check only documentation and for minor code

[PATCH] D94621: [clang-tidy] add concurrency-async-fs

2021-01-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/concurrency-async-fs.rst:6 + +Search for filesystem accesses that might block current system thread. +Asynchronous code may deal with it in numerous ways, the most widespread

[PATCH] D93940: [clang-tidy] Add a check for blocking types and functions.

2020-12-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/concurrency/AsyncBlockingCheck.cpp:319 +assert(L); +const auto *EV = L->ensureEvaluatedStmt(); +if (EV && EV->Evaluated.getKind() == APValue::ValueKind::None) { Please

[PATCH] D93940: [clang-tidy] Add a check for blocking types and functions.

2020-12-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/concurrency-async-blocking.rst:7 +Checks for some synchronous functions and types that volunteerly preempt system +thread. Volunteer preemption of a system thread in asynchronous code

[PATCH] D93940: [clang-tidy] Add a check for blocking types and functions.

2020-12-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/concurrency/AsyncBlockingCheck.cpp:1 +//===--- AsyncBlockingCheck.cpp - clang-tidy ===// +// Please make length same as end of comment.

[PATCH] D93861: [clang-tidy][NFC] Split up some headers

2020-12-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyContext.h:9 -#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYDIAGNOSTICCONSUMER_H -#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYDIAGNOSTICCONSUMER_H Should header

[PATCH] D93182: [clang-tidy] Add linux kernel log functions checker

2020-12-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Maybe Clang's `-Wformat` should be extended to cover Linux kernel-specific format options? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93182/new/ https://reviews.llvm.org/D93182

[PATCH] D92992: [clang-tidy] Add make_unique_for_overwrite/make_shared_for_overwrite check.

2020-12-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:143 +- New :doc:`modernize-make-shared-for-overwrite + ` check. Please keep alphabetical order. Comment at:

[PATCH] D92652: [clang-tidy][docs] Update check options with boolean values instead of non-zero/0/1

2020-12-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. Looks OK for me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92652/new/ https://reviews.llvm.org/D92652

[PATCH] D92179: [clang-tidy] Catch more unwanted implicit conversions in performance-implicit-conversion-in-loop

2020-11-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention renaming in Release Notes. Comment at: clang-tools-extra/clang-tidy/performance/ImplicitConversionCheck.cpp:1 -//===--- ImplicitConversionInLoopCheck.cpp - clang-tidy===// +//===---

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-11-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:614 + if (CRD->isUnion()) +return ""; + Returning {} as default initializer will be better. Same in other places. Repository: rG LLVM

[PATCH] D91908: [clang-tidy] Use compiled regex for AllowedRegexp in macro usage check

2020-11-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please add test case for new command-line option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91908/new/ https://reviews.llvm.org/D91908 ___ cfe-commits mailing list

[PATCH] D91789: [clang-tidy] find/fix unneeded trailing semicolons in macros

2020-11-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/linuxkernel/MacroTrailingSemiCheck.cpp:31 +const MacroDirective *MD) override { +auto *MI = MD->getMacroInfo(); + Please don't use auto when type is not

[PATCH] D91037: [clang-tidy][bugprone-use-after-mnove] Warn on std::move for consts

2020-11-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp:87 + if (!BinOpCond) +if (auto *ExprWithCleanupsCond = +dyn_cast_or_null(InnerIf->getCond())) Please fix warning.

[PATCH] D91000: [clang-tidy] CERT MSC24-C Obsolescent Functions check

2020-11-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/ObsolescentFunctionsCheck.cpp:19 +namespace { +static Preprocessor *PP; +} Why this could not be member of check class? Comment at:

[PATCH] D90972: [clang-tidy] Install run-clang-tidy.py in bin/ as run-clang-tidy

2020-11-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:76 +- The run-clang-tidy.py helper script is now installed in bin/ as + run-clang-tidy. It was previously installed in share/clang/. Please enclose run-clang-tidy.py,

[PATCH] D90851: [clang-tidy] Extending bugprone-signal-handler with POSIX functions.

2020-11-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-signal-handler.rst:31 + is not included). Default is ``POSIX``. \ No newline at end of file Please add newline. Repository: rG LLVM Github Monorepo

[PATCH] D90180: [clang-tidy] find/fix unneeded semicolon after switch

2020-10-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D90180#2357178 , @trixirt wrote: > Discussion of change on LKML > https://lkml.org/lkml/2020/10/27/2538 > > On why the existing clang fixit is not practical. > tl;dr > 10,000 changes to look for a treewide fix > The

[PATCH] D90180: [clang-tidy] find/fix unneeded semicolon after switch

2020-10-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think CLang should do this job, since it has two related warnings already. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90180/new/ https://reviews.llvm.org/D90180 ___

[PATCH] D89407: [clang-tidy] Add scoped enum constants to identifier naming check

2020-10-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to add test for suffix/prefix too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89407/new/ https://reviews.llvm.org/D89407 ___ cfe-commits

[PATCH] D88831: [clang-tidy] Remove obsolete checker google-runtime-references

2020-10-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Does this check make sense in content of other style guides? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88831/new/ https://reviews.llvm.org/D88831 ___ cfe-commits

[PATCH] D72218: [clang-tidy] new altera kernel name restriction check

2020-09-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/altera-kernel-name-restriction.rst:4 +altera-kernel-name-restriction + + Please make same length as text above. CHANGES SINCE LAST ACTION

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C.

2020-09-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:94 + +- New :doc:`cert-sig30-c + ` check. Please rebase from trunk. New checks section is above and somehow header is missed in your file. Repository: rG LLVM Github

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C.

2020-09-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Release Notes were not updated yet. Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-sig30-c.rst:10 +The minimal list of asynchronous-safe system functions is: +``abort()``, ``_Exit()``, ``quick_exit()`` and ``signal()`` (for ``signal``

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C.

2020-09-10 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/cert/SignalHandlerCheck.cpp:26 +namespace { +constexpr StringRef SignalFun = "signal"; +constexpr StringRef AbortFun = "abort"; Only type definitions

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

2020-09-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D66564#2256423 , @ffrankies wrote: > @Eugene.Zelenko I don't have commit access to the repository, could you > please commit this check on our behalf? Sorry, I don't have it either. @aaron.ballman or @njames93 could do

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-08-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D86671#2246486 , @dougpuob wrote: > In D86671#2246480 , @Eugene.Zelenko > wrote: > >> By the word, you must mention new option in documentation too. > > Hi @Eugene.Zelenko, > Is

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-08-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. By the word, you must mention new option in documentation too. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:73 +- Added: Support variables could be checked with Hungarian Notation which the + prefix encodes the actual data type of the

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-08-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:73 +- Added: Support variables could be checked with Hungarian Notation which the + prefix encodes the actual data type of the variable. See examples for entry format

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