[PATCH] D52281: Use std::invoke in generic code

2018-09-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:1 +//===--- ReplaceGenericFunctorCallCheck.cpp - clang-tidy---===// +// Please add space after clang-tidy. Comment at: cl

[PATCH] D52281: [clang-tidy] Add modernize check to use std::invoke in generic code

2018-09-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:114 +} +} // namespace modernize +} // namespace tidy Please insert empty line above. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52281

[PATCH] D52281: [clang-tidy] Add modernize check to use std::invoke in generic code

2018-09-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Looks like you patch is not based on trunk. Please rebase. Comment at: docs/ReleaseNotes.rst:60 +- New `modernize-replace-generic-functor-call + `_ ch

[PATCH] D52552: [clang-tidy] Flag Classes Inheriting From Structs

2018-09-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:109 +- New :doc:`misc-class-inherit-from-struct + ` check. Please use alphabetical order for new checks list. Comment at: docs/clang-tidy/checks/misc-class-inherit-from-

[PATCH] D51949: [clang-tidy] new check 'readability-isolate-declaration'

2018-09-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. How about creating CERT alias? Comment at: clang-tidy/readability/IsolateDeclarationCheck.cpp:58 + // number of transformations. + while (Indirections--) { +Start = findPreviousAnyTokenKind(Start, SM, LangOpts, tok::star, tok::amp); ---

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-09-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:96 +- New alias :doc:`cert-dcl16-c + ` to :doc:`readability-uppercase-literal-suffix Please move alias after new checks. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-09-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. May be we should also create MISRA module? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D52892: [Clang-tidy] readability check to convert numerical constants to std::numeric_limits

2018-10-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think modernize is better module for this check. Comment at: clang-tidy/readability/NumericalCostantsToMaxIntCheck.cpp:58 +bool &IL, SourceLocation *IS) +: IL(&IL), AtLeastOneInclude(false), IS(IS){}; + Semicolon at end

[PATCH] D52892: [Clang-tidy] readability check to convert numerical constants to std::numeric_limits

2018-10-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be good idea to handle climits constants too. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D52892: [Clang-tidy] readability check to convert numerical constants to std::numeric_limits

2018-10-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/NumericalCostantsToMaxIntCheck.cpp:44 +SrcMgr::CharacteristicKind FileType) { + + if (FileName == "limits") { Unnecessary empty line. Repository: rCTE Clang Tools Extra https://rev

[PATCH] D52892: [Clang-tidy] readability check to convert numerical constants to std::numeric_limits

2018-10-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/NumericalCostantsToMaxIntCheck.cpp:62 +CompilerInstance &Compiler) { + if (this->getLangOpts().CPlusPlus) { +Compiler.getPreprocessor().addPPCallbacks( JonasToth wrote: > you dont n

[PATCH] D52892: [Clang-tidy] readability check to convert numerical constants to std::numeric_limits

2018-10-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:118 + + Checks for numerical unsigned constants that are equal to '-1' or '~0' + and substitutes them with 'std::numeric_limits::max()'. Wrong kind of quotes were used. Should be `. std::nu

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2019-02-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Herald added subscribers: dkrupp, rnkovacs. Herald added a project: LLVM. Please look at recently filed PR40544. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D35937/new/ https://reviews.llvm.org/D35937 ___

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:82 +- The :doc:`bugprone-argument-comment + ` now supports Please move changes in existing checks after list of new checks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57674/n

[PATCH] D57966: [clang-tidy] add camelBackOrCase casing style to readability-identifier-naming to support change to variable naming policy (if adopted)

2019-02-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/readability-identifier-naming.rst:30 +``camelBackOrCase`` allows for both `camelBack` or `CamelCase` cased +identifiers to be used to match prior LLVM code style Please fix double space.

[PATCH] D33841: [clang-tidy] redundant keyword check

2019-02-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new check in Release Notes. Comment at: clang-tidy/readability/RedundantExternCheck.cpp:55 +} // namespace clang \ No newline at end of file Please add new line. Comment at: clang-tidy/readabili

[PATCH] D58137: [clang-tidy] Add the abseil-time-subtraction check

2019-02-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:91 + + Finds and fixes `absl::Time` subtraction expressions to do subtraction + in the Time domain instead of the numeric domain. Please use two not one ` for language constructs. ===

[PATCH] D58137: [clang-tidy] Add the abseil-time-subtraction check

2019-02-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/TimeSubtractionCheck.cpp:72 + +// Match the cases where we know that the result is a Duration and the first +// argument is a Time. Just knowing the type of the first operand is not Jon

[PATCH] D58478: [index-while-building] FileIndexRecord

2019-02-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/include/clang/Index/DeclOccurrence.h:1 +//===--- DeclOccurrence.h - An occurrence of a decl within a file -===// +// Missing C++ tag. See other headers as example. Comment at: cla

[PATCH] D58478: [index-while-building] FileIndexRecord

2019-02-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/include/clang/Index/DeclOccurrence.h:1 +//===--- DeclOccurrence.h - An occurrence of a decl within a file - C++ -*-===// +// Tag should contain *- C++ -*, so you could remove dashes at beginning and equal

[PATCH] D33826: [clang-tidy] avoid pointer cast to more strict alignment check

2017-08-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D33826#856610, @lebedev.ri wrote: > Any status update here? :) > I generally do see a benefit in this check, because `-Wcast-align` (at least > currently?) does not warn on `reinterpret_cast<>()`. I think will be good idea to extend

[PATCH] D37479: run-clang-tidy: Report progress

2017-09-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to introduce command line option to control progress display: turn it off, show in absolute numbers or percents. https://reviews.llvm.org/D37479 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D37479: run-clang-tidy: Report progress

2017-09-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be also nice to output progress in terminal when all messages will saved into file. https://reviews.llvm.org/D37479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D37479: run-clang-tidy: Report progress

2017-09-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think CMake output is good model for run-clang-tidy. https://reviews.llvm.org/D37479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-09-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to extend -Wswitch diagnostics. https://reviews.llvm.org/D37808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-09-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D37808#869612, @JonasToth wrote: > In https://reviews.llvm.org/D37808#869602, @Eugene.Zelenko wrote: > > > I think will be good idea to extend -Wswitch diagnostics. > > > Ok. But it will introduce new warnings to llvm codebase itself. I

[PATCH] D62736: [clang-tidy] Fix make-unique check to work in C++17 mode.

2019-05-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp:306 +if (CEArg->isElidable()) { + if (const auto *TempExp = CEArg->getArg(0)) { +if (const auto *UnwrappedCE = Return type

[PATCH] D62736: [clang-tidy] Fix make-unique check to work in C++17 mode.

2019-05-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp:306 +if (CEArg->isElidable()) { + if (const auto *TempExp = CEArg->getArg(0)) { +if (const auto *UnwrappedCE = gribozavr wr

[PATCH] D62736: [clang-tidy] Fix make-unique check to work in C++17 mode.

2019-05-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp:306 +if (CEArg->isElidable()) { + if (const auto *TempExp = CEArg->getArg(0)) { +if (const auto *UnwrappedCE = gribozavr wr

[PATCH] D62736: [clang-tidy] Fix make-unique check to work in C++17 mode.

2019-05-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp:306 +if (CEArg->isElidable()) { + if (const auto *TempExp = CEArg->getArg(0)) { +if (const auto *UnwrappedCE = gribozavr wr

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-06-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp:37 +void DynamicStaticInitializersCheck::registerMatchers(MatchFinder *Finder) { + // FIXME: Add matchers. + if (!getLangOpts().CPlusPlus) ---

[PATCH] D62437: [clang-tidy] Splits fuchsia-default-arguments

2019-06-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:122 + Warns if a function or method is called with default arguments. + This was previously done by fuchsia-default-arguments check, which has been + removed. Please high

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to replace //upgrade// with //modernize// to be consistent with similar checks in other module. Comment at: clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp:170 + +llvm::StringRef getNewMethodName(llv

[PATCH] D63324: [clang-tidy] Replace memcpy by std::copy

2019-06-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. New check must be mentioned in Release Notes and its documentation provided. Comment at: clang-tools-extra/clang-tidy/modernize/ReplaceMemcpyByStdCopy.cpp:68 +const CallExpr *MemcpyNode) { + const auto

[PATCH] D63367: [clang-doc] Add basic support for templates and typedef

2019-06-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-doc/Serialize.cpp:182 static RecordDecl *getDeclForType(const QualType &T) { - auto *Ty = T->getAs(); - if (!Ty) -return nullptr; - return Ty->getDecl()->getDefinition(); + if (const auto *D = T->g

[PATCH] D63324: [clang-tidy] Replace memcpy by std::copy

2019-06-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/ReplaceMemcpyByStdCopy.cpp:11 +#include "../utils/OptionsUtils.h" + +#include Please remove unnecessary empty line. Comment at: clang-tools-extra/clang-ti

[PATCH] D63324: [clang-tidy] Replace memcpy by std::copy

2019-06-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/ReplaceMemcpyByStdCopy.h:41 + std::unique_ptr Inserter; + const utils::IncludeSorter::IncludeStyle IncludeStyle; +}; I think this could be determined from .clang-format.

[PATCH] D63324: [clang-tidy] Replace memcpy by std::copy

2019-06-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:192 + + This check replaces all occurrences of the C ``memcpy`` function by ``std::copy``. + Please remove //This check//. Same in first statement in documentation. CH

[PATCH] D63559: [clang-tidy] Added functionality for getting semantic highlights for variable and function declarations

2019-06-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:1 +#include "SemanticHighlight.h" + Header is missing. Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:32 + void addSymbol(Decl *D, Sem

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

2019-07-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/InitLocalVariablesCheck.cpp:8 +//===--===// +#include "InitLocalVariablesCheck.h" +#include "clang/AST/ASTContext.h" ---

[PATCH] D64736: [clang-tidy] New bugprone-infinite-loop check for detecting obvious infinite loops

2019-07-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/InfiniteLoopCheck.cpp:164 + + std::string Result = ""; + for (const Stmt *Child : Cond->children()) { Unnecessary initialization. See readability-redundant-string-init. Com

[PATCH] D65107: [clang-doc] Fix html entities in rendered text

2019-07-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-doc/HTMLGenerator.cpp:181 +std::string TextNode::getHTMLEntity(const char &C) { + switch (C) { There is printHTMLEscaped() in ADT/StringExtras.h. May b it could be used or common code m

[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-07-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:75 + + Checks Linux Kernel code to see if it uses the results from the functions in + linux/err.h. Also checks to see if code uses the results from functions that Please h

[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-07-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:77 + + This is important in the Linux kernel because ``ERR_PTR``, ``PTR_ERR``, + ``IS_ERR``, ``IS_ERR_OR_NULL``, ``ERR_CAST``, and ``PTR_ERR_OR_ZERO`` return Release Notes

[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-07-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:77 + + This is important in the Linux kernel because ``ERR_PTR``, ``PTR_ERR``, + ``IS_ERR``, ``IS_ERR_OR_NULL``, ``ERR_CAST``, and ``PTR_ERR_OR_ZERO`` return tmroeder wrot

[PATCH] D65343: [clang-tidy] Fix the documentation for linuxkernel-must-use-errs.

2019-07-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Looks OK, but please make this changes in D59963 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65343/new/ https://reviews.llvm.org/D65343 ___

[PATCH] D65343: [clang-tidy] Fix the documentation for linuxkernel-must-use-errs.

2019-07-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Sorry, I didn't notice that D59963 was committed. In general it's not good idea to commit changes when patch was not approved. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65343/ne

[PATCH] D65483: [clang-doc] Add link to source code in file definitions

2019-07-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be reasonable to mention new command-line arguments in documentation and Release Notes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65483/new/ https://reviews.llvm.org/D65483 ___ cfe-commits mailing

[PATCH] D65622: [clang-doc] Update documentation

2019-08-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-doc.rst:93 +--public - Document only public declarations. +--stylesheets= - CSS stylesheets to extend the default styles. It'll be reasonable to mention t

[PATCH] D65828: [clang-tidy] Add check to linuxkernel for unbalanced irq calls

2019-08-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/linuxkernel/IrqUnbalancedCheck.cpp:13 + +std::string annotation = "ignore_irq_balancing"; + Should be static and may be StringRef? Comment at: clang-tools-extra/docs

[PATCH] D65912: Add new check for math constants

2019-08-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. May be this check belongs to readability module? Comment at: clang-tools-extra/clang-tidy/misc/MathConstantsCheck.cpp:13 +#include "../../../clang/unittests/AST/Language.h" + +#include Unnecessary empty line.

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

2019-08-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/google/RequireCategoryMethodPrefixesCheck.cpp:16 +namespace { +const char *kCustomCategoryMethodIdentifier = "ThisIsACategoryMethod"; +} // anonymous namespace Please use static. See

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think patch should be split at least on Clang-tidy check and results of its run on LLVM code. Probably per-target patches is even better solution. Comment at: clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp:48 +R

[PATCH] D65912: [clang-tidy] Add new check for math constants

2019-08-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D65912#1623375 , @ZaMaZaN4iK wrote: > > ... then I have a script that runs clang-tidy over all the compilation > > units in a compilation database > > Can you share this script please? :) run-clang-tidy.py which is shi

[PATCH] D63623: [clang-tidy] Add a check on expected return values of posix functions (except posix_openpt) in Android module.

2019-06-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/android/PosixReturnCheck.h:1 +//===--- PosixReturnCheck.h - clang-tidy*- C++ -*-// +// Please use - before *- C++ -* to fill line. See other checks as exam

[PATCH] D63663: [clang-doc] Add html links to the parents of a RecordInfo

2019-06-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-doc/HTMLGenerator.cpp:21 namespace { Anonymous namespace is used for functions when LLVM Coding Guidelines tells using static for same purpose. Comment at: clang-to

[PATCH] D63559: [clang-tidy] Added functionality for getting semantic highlights for variable and function declarations

2019-06-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:1 +#include "SemanticHighlight.h" +#include "SourceCode.h" License header was not added despite comment was marked as done. Comment at: clang-tools

[PATCH] D63763: [clang-tidy] Update documentation for Qt Creator integration.

2019-06-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Looks OK for me, but will be good idea to hear other people too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63763/new/ https://reviews.llvm.org/D63763 ___ cfe-commits

[PATCH] D63929: [clang-tidy] - Introduce abseil-prefixed-thread-annotations check.

2019-06-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/abseil/PrefixedThreadAnnotationsCheck.cpp:15-16 + +constexpr char kAbseilThreadAnnotationsHeader[] = +"absl/base/internal/thread_annotations.h"; + lebedev.ri wrote: > constexpr St

[PATCH] D64123: Add clang-llvm-rename tool.

2019-07-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. There is clang-rename already. May be new functionality should be added there? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64123/new/ ht

[PATCH] D64151: Enhance abseil-faster-strsplit-delimiter to handle other non-printable characters.

2019-07-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp:10 #include "FasterStrsplitDelimiterCheck.h" + #include "clang/AST/ASTContext.h" Unnecessary empty line. Repository: rG LLVM Github Monor

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/clang-analyzer-apiModeling.StdCLibraryFunctions.rst:4 +clang-analyzer-apiModeling.StdCLibraryFunctions +

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. May be script should generate documentation during build, so files .rst files are not needed? Please also insert empty line between header (===) and text. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ ht

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D64454#1579466 , @Nathan-Huckleberry wrote: > Docs exist for these checks on the analyzer side, they're just all on the > same page and hyperlinking to them individually is difficult because the > links have a nonstand

[PATCH] D61967: [clang-tidy] Add a close-on-exec check on pipe() in Android module.

2019-05-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/android-cloexec-pipe.rst:6 + +The usage of ``pipe()`` is not recommended, it's better to use ``pipe2()``. +Without this flag, an opened sensitive file descriptor would remain open across --

[PATCH] D61967: [clang-tidy] Add a close-on-exec check on pipe() in Android module.

2019-05-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/android-cloexec-pipe.rst:4 +android-cloexec-pipe +== + Please make same length as name above. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D61989: [clang-tidy] enable modernize-concat-nested-namespaces on header files

2019-05-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Will be good idea to mention new option in the Release Notes. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize-concat-nested-namespaces.rst:56 + A comma-separated list of filename extensions of header files (the filename + exte

[PATCH] D62049: [clang-tidy] Add a close-on-exec check on pipe2() in Android module.

2019-05-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/android/CloexecPipe2Check.h:1 +//===--- CloexecPipe2Check.h - clang-tidy--*- C++ -*-===// +// Please extend to 80 characters. Same in source file. Repository: r

[PATCH] D61967: [clang-tidy] Add a close-on-exec check on pipe() in Android module.

2019-05-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/android/CloexecPipeCheck.h:1 +//===--- CloexecPipeCheck.h - clang-tidy---*- C++ -*-===// +// Please extend to 80 characters. Same in source file. Repository: rG

[PATCH] D62192: [clang-tidy]: Add cert-oop54-cpp alias for bugprone-unhandled-self-assignment

2019-05-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention alias (in aliases list) in Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62192/new/ https://reviews.llvm.org/D62192 ___ cfe-commits mailing

[PATCH] D62437: [clang-tidy] Splits fuchsia-default-arguments

2019-05-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention renaming of existing check in Release Notes (after list of new checks). Comment at: clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsDeclarationsCheck.cpp:23 +void DefaultArgumentsDeclarationsCheck::check(const MatchFinder::M

[PATCH] D62437: [clang-tidy] Splits fuchsia-default-arguments

2019-05-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsCallsCheck.cpp:1 +//===--- DefaultArgumentsCallsCheck.cpp - clang-tidy---===// +// Please add space after clang-tidy. C

[PATCH] D48866: [clang-tidy] Add incorrect-pointer-cast checker

2018-12-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:139 + + Warns for cases when pointer is cast and the pointed to type is + incompatible with allocated memory area type. This may lead to access memory Please wrap up to 80 characters. Same

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2018-12-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:93 + + Checks for instances of initializing a `unique_ptr` with a direct call to + `new` and suggests using `absl::make_unique` instead. Please use double `, not single ones to hightlight l

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2018-12-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/MakeUniqueCheck.cpp:28 + recordType(hasDeclaration(classTemplateSpecializationDecl( + hasName("::std::unique_ptr"), templateArgumentCountIs(2), + hasTemplateArgument( EricW

[PATCH] D55640: [clang-tidy] Implement a check for large Objective-C type encodings 🔍

2018-12-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/objc-type-encoding-size.rst:6 + +Finds Objective-C type encodings that exceed a configured threshold. + Please synchronize with Release Notes. Repository: rCTE Clang Tools Extra CHANGES

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

2018-12-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please close PR25403 after commit. Comment at: docs/ReleaseNotes.rst:70 +- New :doc:`readability-duplicated-access-specifiers + ` check. Please use alphabetical order for new checks. Repository: rCTE Clang Tools Extra CHA

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

2018-12-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/DuplicatedAccessSpecifiersCheck.cpp:36 + NS != NSEnd; ++NS) { +const auto *decl = *NS; + Type is not obvious here, so please don't use auto. CHANGES SINCE LAST ACTION https://r

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please run script from D55523 over your changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/ https://reviews.llvm.org/D54945 ___ cfe-commits mailing list cfe-co

[PATCH] D56012: [clang-tidy] Be more liberal about literal zeroes in abseil checks

2018-12-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: test/clang-tidy/abseil-duration-factory-scale.cpp:3 +#include #include "absl/time/time.h" cstdint, please. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56012/ne

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

2018-12-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new check in Release Notes and list of checks. It'll be good idea to used add_new_check.py. Comment at: clang-tidy/modernize/UseTrailingReturnCheck.cpp:22 +// very similar to UseOverrideCheck +SourceLocation findTrailingReturnType

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

2019-01-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:35 +- New :doc:`modernize-use-trailing-return + ` check. Please rebase from trunk and use alphabetical order for new checks list. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56

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

2019-01-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/modernize/UseTrailingReturnCheck.cpp:45 +std::string(Message) + +" (no FixIt provided, function argument list end is inside macro)"); +return {}; MyDeveloperDay wrote: > bernhar

[PATCH] D56424: [clang-tidy] Add check for underscores in googletest names.

2019-01-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.cpp:46 +auto IdentifierInfo = MacroNameToken.getIdentifierInfo(); +if (!IdentifierInfo) { + return; Please elide braces. Repository: rCTE Cla

[PATCH] D56424: [clang-tidy] Add check for underscores in googletest names.

2019-01-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:161 + + Checks that Googletest test and test case names do not contain an underscore, + which is prohibited by the Googletest FAQ. Please synchronize with first statement in documentation.

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2019-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/integrations.rst:118 +allows to use a custom :program:`clang-tidy` binary. \ No newline at end of file Please add newline. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/ https

[PATCH] D56532: [clang-tidy] Add the abseil-duration-conversion-cast check

2019-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/DurationConversionCastCheck.cpp:41 + + if (!isNotInMacro(Result, MatchedCast)) return; + Please run Clang-format. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56532/new/ https://revi

[PATCH] D67578: [clang-tidy] New check to warn when writing to a dispatch_once_t variable.

2019-09-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-dispatch-once-assignment.rst:9 +and making such direct writes may potentially violate the run-once protections +intended by the library. Does library documentation co

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/lib/Tooling/Refactoring/SourceCodeBuilders.cpp:77 + + if (Text.empty()) return std::string(); + // Add leading '*'. Could return {}. Same in other places. By the word, did you run Clang-format over code?

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/MissingHashCheck.cpp:40 +void MissingHashCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher( + objcMethodDecl( Should check if language is Objective-C. See

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:105 +- New :doc:`objc-missing-hash + ` check. Wrong place. Please move to new checks list (in alphabetical order). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D67865: [clang-tidy] Finds uses of OSRead* calls on macOS that may mask unexpected behavior due to unaligned reads

2019-09-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/objc/AvoidOSReadCheck.cpp:21 +void AvoidOSReadCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher( + callExpr(callee((functionDecl(hasAnyName( Please add check if language is Objec

[PATCH] D67865: [clang-tidy] Finds uses of OSRead* calls on macOS that may mask unexpected behavior due to unaligned reads

2019-09-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/objc/AvoidOSReadCheck.h:5 +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. License was changed this year. Same in source file. Re

[PATCH] D67865: [clang-tidy] Finds uses of OSRead* calls on macOS that may mask unexpected behavior due to unaligned reads

2019-09-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/objc-avoid-osread.rst:26 + +The OSRead* functions from libkern/OSByteOrder.h have undocumented dependencies on aligned reads due to type punning by casting through a pointer: + Please highl

[PATCH] D68074: [clang-tidy] Add readability-make-member-function-const

2019-09-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. See also PR21981 and D45444 . Comment at: clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp:93 + bool VisitUser(const ImplicitCastExpr *Cast) { + +if (Cast->getCastKind() != CK_NoOp)

[PATCH] D68074: [clang-tidy] Add readability-make-member-function-const

2019-09-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp:60 + template const T *getParent(const Expr *E) { +auto Parents = Ctxt.getParents(*E); +if (Parents.size() != 1) Return type is

[PATCH] D68148: [clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock

2019-09-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:70 +- The 'objc-avoid-spinlock' check was renamed to :doc:`darwin-avoid-spinlock + ` Please place this after list of new checks. If there are other renamed checks, pleas

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. There is Clang-tidy's readability-implicit-bool-conversion check. It may be reasonable to check pointers to integers too, since integers are often implicitly converted to b

[PATCH] D45679: [clang-tidy] Add a new check, readability-unmodified-non-const-variable, that finds declarations of non-const variables that never get modified.

2018-04-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. See also https://reviews.llvm.org/D45444. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D45444: [clang-tidy] WIP: implement new check for const-correctness

2018-04-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D45444#1068496, @shuaiwang wrote: > - I would imagine things could get messier if this check expands to also > check for turning member functions const: it's basically checking > CxxThisExpr, being a handle, is not modified within a me

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