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

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

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

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

[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 &LangOpts) const override; +}; This method is usually inlined. Repository:

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

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

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

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

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

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

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

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

[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] 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: clang-tools-e

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

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

2019-08-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new module and check in Release Notes. Comment at: clang-tidy/fpga/FPGATidyModule.cpp:5 +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. Licens

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

2019-08-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fpga/FPGATidyModule.cpp:15 + + +using namespace clang::ast_matchers; Unnecessary empty line. Comment at: clang-tidy/fpga/FPGATidyModule.cpp:32 + +} // namespace flocl + --

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/PthreadReturnCheck.cpp:1 +//===--- PthreadReturnCheck.cpp - +//clang-tidy-===// Please make it single line, 80 characters long. =

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/PthreadReturnCheck.cpp:1 +//===--- PthreadReturnCheck.cpp - clang-tidy---===// +//clang-tidy-===// Please put spac

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

2019-08-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fpga/StructPackAlignCheck.h:1 +//===--- StructPackAlignCheck.h - clang-tidy-*- C++ -*-===// +// Please add space after clang-tidy. Same in source file. Comment at

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-08-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/cppcoreguidelines-init-variables.cpp:3 + +#include + It'll be better to include cstdint. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64671/new/ https://reviews.llvm

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-08-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/cppcoreguidelines-init-variables.cpp:3 + +#include + lebedev.ri wrote: > Eugene.Zelenko wrote: > > It'll be better to include cstdint. > I'll correct that comment: tests normall

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

2019-08-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:72 + + Contains lint checks related to OpenCL programming for FPGAs. + Just checks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66564/new/ https://reviews.llvm.org/D66564 __

[PATCH] D66627: [clang-tidy] add checks to bugprone-posix-return

2019-08-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be reasonable to mention changes in Release Notes and check documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 ___

[PATCH] D66627: [clang-tidy] add checks to bugprone-posix-return

2019-08-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:70 +- New :doc:`bugprone-posix-return + ` check. Check is not new, just modified. Such check should be after new checks. Comment at: clang-tools-extra/

[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.

2019-09-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:70 +- New :doc:`google-objc-require-category-method-prefixes + ` check. Please sort new checks list alphabetically. CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D67135: Support proto repeated field in performence-inefficient-vector-operation

2019-09-03 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/performance-inefficient-vector-operation.rst:9 +When EnableProto, also finds calls that add element to protobuf repeated field +in a loop without

[PATCH] D67265: [clang-tidy] Magic number checker shouldn't warn on user defined string literals

2019-09-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp:125 +// std::string s = "Hello World"s; +if (const UserDefinedLiteral *UDL = Parent.get()) + if (UDL->getLiteralOperatorKind() == UserDefinedL

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be reasonable to get IncludeStyle default from .clang-format. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:71 + +- New :doc:`cppcoreguidelines-init-variables + ` check. Please sort new checks list alphabetically.

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D64671#1661585 , @jpakkane wrote: > > It'll be reasonable to get IncludeStyle default from .clang-format. > > I looked at existing checks and they all do the same thing as this one. In > fact I got the code for this by d

[PATCH] D36051: [clang-tidy] List the checkers with autofix

2017-07-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to do this in -list-checks too. https://reviews.llvm.org/D36051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36759: [clang-tidy] Use CloexecCheck as base class of CloexecFopenCheck.

2017-08-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think you could combine this refactoring into single change. https://reviews.llvm.org/D36759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36759: [clang-tidy] Use CloexecCheck as base class of CloexecFopenCheck.

2017-08-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D36759#842367, @chh wrote: > Eugene, do you mean combining this one, https://reviews.llvm.org/D36756, and > https://reviews.llvm.org/D36755 into one? > I don't mind either way. Sure. All three diffs are of same kind. https://revie

[PATCH] D36759: [clang-tidy] Use CloexecCheck as base class of CloexecFopenCheck.

2017-08-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please abandon this and other similar revisions as obsoleted by https://reviews.llvm.org/D36761. https://reviews.llvm.org/D36759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `readability-useless-intermediate-var + `_ check Please place new checks in alphabetica

[PATCH] D71973: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2019-12-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.cpp:38 + + if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) { +const auto NonEmptyBaseIt = llvm::find_if(CXXRD->bases(), IsNotEmptyBase); Y

[PATCH] D71973: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2019-12-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:103 + +- New alias :doc:`cert-exp42-c + ` to gbencze wrote: > Eugene.Zelenko wrote: > > Please move into aliases section (in alphabetical order) > I'm not quite sure where

[PATCH] D72213: [clang-tidy] Add `bugprone-reserved-identifier` to flag usages of reserved C++ names

2020-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp:49 +} +static Optional getDoubleUnderscoreFixup(StringRef Name) { + if (hasDoubleUnderscore(Name)) { Please separate with empty line. ==

[PATCH] D72213: [clang-tidy] Add `bugprone-reserved-identifier` to flag usages of reserved C++ names

2020-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D72213#1804447 , @Mordante wrote: > @eugene `Please don't use auto when type is spelled in same statement or > iterator.` do you mean `type is not spelled` ? Yes, you are correct. Sorry for mistake. Repository: rG

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

2020-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/altera/KernelNameRestrictionCheck.cpp:21 +namespace { +class KernelNameRestrictionPPCallbacks : public PPCallbacks { +public: Please separate with empty line. Comment at: clang-tidy/a

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. May be check belong to LLVM module? Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:69 + if (auto Var = Result.Nodes.getNodeAs("auto_ptr")) { + +if (!Var->getType().getTypePtr()->getPointeeType().isConstQualified(

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

2020-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/altera/KernelNameRestrictionCheck.cpp:13 +#include "clang/Lex/Preprocessor.h" + +using namespace clang::ast_matchers; Please include string, vector Comment at: clang-tidy/altera/Kerne

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:46 +} +CharSourceRange getFixitRange(const VarDecl *Var) { + return CharSourceRange::getTokenRange(Var->getBeginLoc(), Please separate with empty li

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

2020-01-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to separate module code in own review or refer to previous one of previous reviews as dependency. Comment at: clang-tidy/altera/UnrollLoopsCheck.cpp:31 +void UnrollLoopsCheck::check(const MatchFinder::MatchResult &Resul

[PATCH] D72241: [clang-tidy] new altera single work item barrier check

2020-01-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to separate module code in own review or refer to previous one of previous reviews as dependency. Comment at: clang-tidy/altera/SingleWorkItemBarrierCheck.cpp:51 +if (Attribute->getKind() == attr::Kind::ReqdWorkGrou

[PATCH] D72239: [clang-tidy] new opencl recursion not supported check

2020-01-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to separate module code in own review or refer to previous one of previous reviews as dependency. Comment at: clang-tidy/opencl/RecursionNotSupportedCheck.cpp:28 +void RecursionNotSupportedCheck::check(const MatchFinder

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp:351 +const std::string &Fixup) { + if (Fixup.empty()) { +return "; cannot be fixed automatically"; Please elide braces. Same be

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-01-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnintendedADLCheck.h:13 +#include "../ClangTidyCheck.h" + +#include Unnecessary empty line. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-01-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unintended-adl.rst:39 + + Semicolon-separated list of names that the check ignores. Default is `swap`. logan-5 wrote: > Eugene.Zelenko wrote: > > Indentation. P

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp:272 + if (const auto *Typedef = + Value->getReturnType().getTypePtr()->getAs()) { +addUsage(NamingCheckFailures, Typedef->getDecl(), --

[PATCH] D72362: [clang-tidy] misc-no-recursion: a new check

2020-01-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be reasonable to add CERT alias. Comment at: clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp:213 + CallGraphNode::CallRecord *Node = &EntryNode; + while (1) { +// Did we see this node before? true ===

[PATCH] D72373: [clang-tidy] extend misc-misplaced-const to detect using besides typedef

2020-01-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.cpp:64 + } else { +assert(0 && "This should not be reachable"); + } llvm_unreachable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. By the word, will be interesting to see results of this check run on LLVM code. Probably results should be split on modules. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:146 +- New alias :doc:`llvm-qualified-auto + ` to ---

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:100 + + Checks for usages of identifiers reserved for use by the C++ implementation. + The C++ standard reserves the following names for such use: One sentence is enough,

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-reserved-identifier.rst:34 + If non-zero, inverts the check, i.e. flags names that are not reserved. + Default is `0`. + JonasToth wrote: > i think you need

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:146 +- New alias :doc:`llvm-qualified-auto + ` to njames93 wrote: > Eugene.Zelenko wrote: > > Please move alias entry into aliases section. See previous release for > >

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:146 +- New alias :doc:`llvm-qualified-auto + ` to njames93 wrote: > Eugene.Zelenko wrote: > > njames93 wrote: > > > Eugene.Zelenko wrote: > > > > Please move alias entry

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:146 +- New alias :doc:`llvm-qualified-auto + ` to njames93 wrote: > Eugene.Zelenko wrote: > > njames93 wrote: > > > Eugene.Zelenko wrote: > > > > njames93 wrote: > > > >

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:159 +void QualifiedAutoCheck::check(const MatchFinder::MatchResult &Result) { + if (auto Var = Result.Nodes.getNodeAs("auto")) { +bool IsPtrConst = isPointerCons

[PATCH] D72448: [clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

2020-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp:24 +namespace { +const CXXConstructExpr *getConstructExpr(const CXXCtorInitializer &CtorInit) { + Expr *InitExpr = CtorInit.getInit(); Please

[PATCH] D72448: [clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

2020-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be reasonable to mention changes in Release Notes (in checks changes section, in alphabetical order). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72448/new/ https://reviews.llvm.org/D72448 ___ cfe-co

[PATCH] D72484: [clang-tidy] Fix check for Abseil internal namespace access

2020-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Should be change mentioned in Release Notes? Comment at: clang-tools-extra/clang-tidy/abseil/NoInternalDependenciesCheck.cpp:40 - diag(InternalDependency->getBeginLoc(), + auto loc_at_fault = + Result.SourceManager->getSpellingLoc(Inter

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/NotTrivialTypesLibcMemoryCallsCheck.cpp:51 +MatchFinder *Finder) { + using namespace ast_matchers::internal; + auto IsStructPointer = [](Matcher Constraint = anything(), Pl

[PATCH] D72484: [clang-tidy] Fix check for Abseil internal namespace access

2020-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mark fixed comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72484/new/ https://reviews.llvm.org/D72484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It may be reasonable to provide options to expand list of problematic functions. See bugprone-suspicious-string-compare as example. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm.org/D

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please rebase from trunk. I sorted Clang-tidy entries in Release Notes and aliases have own subsubsection. Please keep alphabetical order there. Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-dcl51-cpp.rst:6 +cert-dcl51-cpp +=

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please rebase from trunk. I sorted Clang-tidy entries in Release Notes and aliases have own subsubsection. Please keep alphabetical order there. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 _

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please describe options in documentation. See other checks documentation as example. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:112 + + This check flags use of the c standard library functions ``memset``, ``memcpy``, + ``memmove``,

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/NotTrivialTypesLibcMemoryCallsCheck.cpp:75 +MatchFinder *Finder) { + + if (!getLangOpts().CPlusPlus) Unnecessary empty line. Comment at: clang-tools-extra

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-oop57-cpp.rst:14 + + Specify extra functions to flag on that act similarily to memset. + Default is an empty string Please enclose memset in double back-ticks. Sam

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-oop57-cpp.rst:16 + Default is an empty string. + The check will detect the following memory setting function: + ``memset`` This repeats first sentence in docume

[PATCH] D72527: [clang-tidy] adjust scripts to subsubsections in Release Notes

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: aaron.ballman, alexfh, hokein. Eugene.Zelenko added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. Herald added a project: clang. I added subsubsections for typical Clang-tidy entries in Release Notes, so no

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-oop57-cpp.rst:14 + + Specify extra functions to flag that act similarily to memset. + Default is an empty string. Somehow memset is still not in double back-ticks.

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

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Documentation and Release Notes entry are still missing.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71607/new/ https://reviews.llvm.org/D71607 ___ cfe-commits mailin

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

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:106 + + Finds cases where a signed value is subtracted from an unsigned value, + a likely cause of unexpected underflow. Please synchronize with first statement in documen

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

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unsigned-subtraction.rst:17 +constants, thus making the implict cast explicit and signals that +the the code was intended. In cases where the second argument is +not a constant,

[PATCH] D72553: [clang-tidy] Add llvm-prefer-preincrement check

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/llvm-prefer-preincrement.rst:30 + both the prefix and postfix operator ``++`` or ``--``. + Default value is 1. + Please highlight default value with single back-ticks.

[PATCH] D72553: [clang-tidy] Add llvm-prefer-preincrement check

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be reasonable to submit patches generated by check into trunk. May be after branching release. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553 __

[PATCH] D72553: [clang-tidy] Add llvm-prefer-preincrement check

2020-01-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D72553#1815497 , @njames93 wrote: > could this do with an alias into performance? Sure. At least such tricky questions were asked on interviews decade ago :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D72553: [clang-tidy] Add llvm-prefer-preincrement check

2020-01-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-prefer-pre-increment.rst:8 + +The cert-oop54-cpp check is an alias, please see +`llvm-prefer-pre-increment `_ Please fix check name. Repository: rG LLVM Gi

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-01-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D54943#1815912 , @0x8000- wrote: > As an aside, once this is merged in, I dream of a "fix-it" for old style C > code: > > int foo; > > ... > /* page of code which does not use either foo or bar */ > ... >

[PATCH] D72484: [clang-tidy] Fix check for Abseil internal namespace access

2020-01-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D72484#1817187 , @rogeeff wrote: > It is my first time submitting clang-tidy change. So I'm not sure of the > procedure exactly. Do we wait for something from me? Reviewers should make comments and finally approve patc

[PATCH] D72527: [clang-tidy] adjust scripts to subsubsections in Release Notes

2020-01-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko updated this revision to Diff 237720. Eugene.Zelenko added a comment. Renamed "New aliases" to "New check aliases". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72527/new/ https://reviews.llvm.org/D72527 Files: clang-tools-extra/

[PATCH] D72527: [clang-tidy] adjust scripts to subsubsections in Release Notes

2020-01-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko marked an inline comment as done. Eugene.Zelenko added a comment. Both scripts works fine. However rename script should also sort entries alphabetically, but probably this should be separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D72121: [clang-tidy] Fix readability-identifier-naming missing member variables

2020-01-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please also close PRs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72121/new/ https://reviews.llvm.org/D72121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:112 + + Flags use of the `C` standard library functions 'memset', 'memcpy' and + 'memcmp' and similar derivatives on non-trivial types. Please use double back-ticks to h

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

2020-01-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.cpp:52 +static bool isUnaryExprOfLiteral(const Expr *E) { + if (const auto *UnOp = dyn_cast(E)) { +return isLiteral(UnOp->getSubExpr()); ---

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

2020-01-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. By the word, please rebase, because Release Notes were reset after version 10 branching. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71199/new/ https://reviews.llvm.org/D71199 ___ cfe-commits mailing list

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

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