[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp:61 + // Check if any of the superclasses of the class match. + for (const auto *SuperClass = Node.getClassInterface()->getSuperClass(); + SuperClass != nullptr;

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-03-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/HeaderFileExtensionsUtils.h:17 +using llvm::SmallSet; + It'll be easier to use llvm::SmallSet in using statement. Comment at:

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-03-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/HeaderFileExtensionsUtils.h:23 -typedef llvm::SmallSet HeaderFileExtensionsSet; +typedef SmallSet HeaderFileExtensionsSet; Please use using. See modernize-use-using.

[PATCH] D59639: [clangd] Print template arguments helper

2019-03-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:26 +llvm::Optional> +getTemplateSpecializationArgLocs(const NamedDecl ) { + if (auto *Func = llvm::dyn_cast()) { ilya-biryukov wrote: > Eugene.Zelenko wrote: > > Functions should

[PATCH] D59639: [clangd] Print template arguments helper

2019-03-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:26 +llvm::Optional> +getTemplateSpecializationArgLocs(const NamedDecl ) { + if (auto *Func = llvm::dyn_cast()) { Functions should be static, not in anonymous namespace. See LLVM

[PATCH] D59605: [clangd] Introduce background-indexer

2019-03-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clangd/index/Background.cpp:29 #include "llvm/Support/SHA1.h" #include Unnecessary empty line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D59599: [clangd] Fix a crash while printing Template Arguments

2019-03-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clangd/AST.cpp:86 else if (auto *Cls = llvm::dyn_cast()) { -if (auto STL = Cls->getTypeAsWritten() - ->getTypeLoc() - .getAs()) { - llvm::SmallVector ArgLocs; -

[PATCH] D59605: [clangd] Introduce background-indexer

2019-03-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clangd/background-indexer/BackgroundIndexer.cpp:13 + +#include "/usr/local/google/home/kadircet/repos/llvm/clang-tools-extra/clangd/Context.h" +#include

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-03-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:790 if (const auto *DeclRef = Result.Nodes.getNodeAs("declRef")) { -SourceRange Range = DeclRef->getNameInfo().getSourceRange(); -addUsage(NamingCheckFailures,

[PATCH] D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator

2019-03-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/IncompleteComparisonOperatorCheck.cpp:197 + + const auto Ops = utils::options::parseStringList(CheckedFunctions); + Finder->addMatcher( Please don't use auto where return type is not

[PATCH] D58977: [clang-tidy] Add the abseil-time-comparison check

2019-03-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-time-comparison.rst:6 + +Checks for comparisons which should be in the ``absl::Time`` domain instead +of the integer domains. Please synchronize with Release Notes.

[PATCH] D58818: [clang-tidy] added cppcoreguidelines-use-raii-locks check

2019-03-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/cppcoreguidelines/UseRaiiLocksCheck.cpp:29 + +DeclRefExpr *findDeclRefExpr(const CXXMemberCallExpr *MemberCallExpr) { + auto *ObjectExpr = MemberCallExpr->getImplicitObjectArgument(); Please use

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-override.rst:5 == Will be good idea to remove duplicated empty line. Comment at:

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

[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

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

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

[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] D57435: [clang-tidy] Add abseil-wrap-unique check

2019-01-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/WrapUniqueCheck.cpp:80 + if (cons) { +if (cons->isListInitialization()) { + return; Please elide braces. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57435/new/

[PATCH] D57435: [clang-tidy] Add abseil-wrap-unique check

2019-01-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/AbseilTidyModule.cpp:61 +"abseil-wrap-unique"); + + } Unnecessary empty line. Comment at: clang-tidy/abseil/WrapUniqueCheck.cpp:10 + +#include +#include

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-double-conversion.rst:28 + +Note: Converting to an integer and back to an `absl::Duration` might be a +truncating operation if the value is not aligned to the scale of conversion.

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/DurationDoubleConversionCheck.cpp:48 + + if (!isNotInMacro(Result, OuterCall)) return; + Please run Clang-format. Comment at: docs/ReleaseNotes.rst:85 + + Find and fix cases

[PATCH] D57113: [clang-tidy] openmp-use-default-none - a new module and a check

2019-01-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. New module is still not mentioned in docs/clang-tidy/index.rst. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57113/new/ https://reviews.llvm.org/D57113 ___ cfe-commits

[PATCH] D57185: [clang-tidy] Add the abseil-duration-addition check

2019-01-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:76 +- New :doc:`abseil-duration-addition + ` check. Please use alphabetical order for new checks. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D57113: [clang-tidy] openmp-use-default-none - a new module and a check

2019-01-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new module in docs/clang-tidy/index.rst. Comment at: docs/ReleaseNotes.rst:76 +- New OpenMP module. + Please put new module before list of new checks. Comment at: docs/ReleaseNotes.rst:83 + +

[PATCH] D56946: [Documentation] Use HTTPS whenever possible in Clang

2019-01-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Yes, I tested all URLs, but I think independent testing will not be excessive. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56946/new/ https://reviews.llvm.org/D56946 ___ cfe-commits

[PATCH] D56945: [clang-tidy] Delete obsolete objc-property-declaration options ✂️

2019-01-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:248 +- The `Acronyms` and `IncludeDefaultAcronyms` options for the + :doc:`objc-property-declaration` Please rebase from trunk and use :option: prefix for options..

[PATCH] D56946: [Documentation] Use HTTPS whenever possible in Clang

2019-01-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: sylvestre.ledru, hans. Eugene.Zelenko added a project: clang. Repository: rC Clang https://reviews.llvm.org/D56946 Files: llvm-svn.src/tools/clang/docs/AutomaticReferenceCounting.rst

[PATCH] D56926: [Documentation] Use HTTPS whenever possible in clang-tools-extra

2019-01-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko updated this revision to Diff 182590. Eugene.Zelenko added a comment. Don't use HTTPS for www.codingstandard.com Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56926/new/ https://reviews.llvm.org/D56926 Files:

[PATCH] D56926: [Documentation] Use HTTPS whenever possible in clang-tools-extra

2019-01-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: alexfh, aaron.ballman, JonasToth, MyDeveloperDay, juliehockett, lebedev.ri. Eugene.Zelenko added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, kbarton, nemanjai. Repository: rCTE Clang Tools

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

2019-01-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I requested merge of updated documentation into 8.0 branch in PR40369. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/ https://reviews.llvm.org/D54945 ___ cfe-commits mailing

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

2019-01-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I fixed links. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/ https://reviews.llvm.org/D54945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2019-01-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. By the word, I noticed that HTTP was used and replaced it with HTTPS in Contributing.rst. Will be good idea to do the same in other documentation. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/

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

2019-01-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. clang-tools-sphinx-docs bot is failing because of: Warning, treated as error: /home/buildbot/llvm-build-dir/clang-tools-sphinx-docs/llvm/src/tools/clang/tools/extra/docs/clang-tidy/Contributing.rst:61: ERROR: Unknown target name: "how to setup tooling for llvm".

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

2019-01-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D54945#1355920 , @MarinaKalashina wrote: > @Eugene.Zelenko > > > I would suggest to rename contribution to Contributing (see LLVM > > documentation) and integrations to Integrations. > > Sure, done. > > > Will be also

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

2019-01-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be worth to mention change in Release Notes (in changes list, in alphabetical order). Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56644/new/ https://reviews.llvm.org/D56644

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

2019-01-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I would suggest to rename //contribution// to //Contributing// (see LLVM documentation) and //integrations// to //Integrations//. Will be also good idea to fix D55523 script warnings. CHANGES SINCE LAST ACTION

[PATCH] D56563: [clang-tidy] add options documentation to readability-identifier-naming checker

2019-01-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/readability-identifier-naming.rst:34 + +When defined, the checker will ensure abstract class names conform to the +selected casing. MyDeveloperDay wrote: > Eugene.Zelenko wrote: > >

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

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

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

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

[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

[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

[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

[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

[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

[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

[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

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

[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

[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] D55410: [clang-tidy] check for flagging using declarations in headers

2018-12-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-alias-free-headers.rst:13 +The style guide http://google.github.io/styleguide/cppguide.html#Aliases discusses this +issue in more detail Naysh wrote: > Eugene.Zelenko wrote: > >

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-nodiscard.rst:49 + + +.. code-block:: c++ Unnecessary empty line. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/ https://reviews.llvm.org/D55433

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. By the word, will be good idea to have script which check alphabetical order and use it during build. Sometimes alphabetical order may be violated after merge with trunk. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55508/new/

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-nodiscard.rst:37 + +Specify a macro to use instead of ``[[nodiscard]]``. This is useful when +maintaining source code that needs to compile with a pre-C++17 compiler. Option

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-nodiscard.rst:37 + +Specify a macro to use instead of ``[[nodiscard]]``. +This is useful when maintaining source code that needs to compile with a pre-C++17 compiler.

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Thank you for this fix! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55508/new/ https://reviews.llvm.org/D55508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:173 + + This check adds ``[[nodiscard]]`` attributes (introduced in C++17) to member + functions to highlight at compile time where the return value of a function Please omit this check.

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:40 +void UseNodiscardCheck::registerMatchers(MatchFinder *Finder) { + + // if we are using C++17 attributes we are going to need c++17 Unnecessary empty line.

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:21 +namespace modernize { +namespace { + Please use static instead anonymous namespace for functions. See LLVM code style guidelines. Comment at:

[PATCH] D55410: [clang-tidy] check for flagging using declarations in headers

2018-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-alias-free-headers.rst:13 +The style guide http://google.github.io/styleguide/cppguide.html#Aliases discusses this +issue in more detail Missing link to guidelines, Repository:

[PATCH] D55410: [clang-tidy] check for flagging using declarations in headers

2018-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:73 + + Flags using declarations in header files, and suggests that + these aliases be removed Please highlight using with ``. Comment at:

[PATCH] D55346: [clang-tidy] check for using declaration scope and qualification

2018-12-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-anonymous-enclosed-aliases.rst:20 + + } // foo Are there guidelines? Comment at: docs/clang-tidy/checks/abseil-qualified-aliases.rst:22 + +See

[PATCH] D55346: [clang-tidy] check for using declaration scope and qualification

2018-12-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/AnonymousEnclosedAliasesCheck.cpp:31 + + +void AnonymousEnclosedAliasesCheck::check(const MatchFinder::MatchResult ) { Please remove unnecessary empty line. Comment at:

[PATCH] D42682: [clang-tidy] Add io-functions-misused checker

2018-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/bugprone-io-functions.rst:4 +bugprone-io-functions += + Please adjust length. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-subtraction.rst:7 +Checks for cases where subtraction should be performed in the +``absl::Duration`` domain. When subtracting two values, and the first one is +known to be a conversion from

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please close PR30233 after committing patch. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54757/new/ https://reviews.llvm.org/D54757 ___ cfe-commits mailing list

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: test/clang-tidy/bugprone-branch-clone.cpp:4 +void test_basic1(int in, int ) { + if (in > 77) +// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if with identical then and else branches [bugprone-branch-clone]

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

2018-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:70 +- New :doc:`abseil-make-unique + ` check. Please use alphabetical order for new checks. Comment at: docs/clang-tidy/checks/abseil-make-unique.rst:6 + +Replaces

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

2018-11-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/index.rst:304 +CLion_ 2017.2 and later `integrates clang-tidy`_ as an extension to the built-in code analyzer. +Inspections and applicable quick-fixes are performed on the fly, and checks can be configured in

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

2018-11-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/utils/LexerUtils.h:43 + if (Start.isInvalid() || Start.isMacroID()) +return SourceLocation(); while (true) { {} could returned instead. Comment at: docs/ReleaseNotes.rst:180

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D54757#1305114, @whisperity wrote: > Bar the previous comments, I really like this. The test suite is massive and > well-constructed. Do we know of any real-world findings, maybe even from LLVM? GCC 7 introduced

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-11-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-comparison.rst:11 +compared against a floating-pointer value, truncation during the ``Duration`` +conversion might yield a different result. In practice this is very rare, and +still

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

2018-11-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New :doc:`misc-incorrect-pointer-cast + ` check hgabii wrote: > Eugene.Zelenko wrote: > > Will be good idea to rebase from trunk and use alphabetical order. > It is rebased. I could

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/BranchCloneCheck.cpp:19 + +namespace { + Please use anonymous namespaces only for type declarations. See LLV coding style guide. Comment at:

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-pp'

2018-11-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:73 + + Finds potentially redundant preprocessor usage. + preprocessor directives? Same in documentation. Comment at: docs/clang-tidy/checks/readability-redundant-pp.rst:8

[PATCH] D54269: Introduce shard storage to auto-index.

2018-11-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clangd/index/Background.cpp:29 #include +#include +#include Please run Clang-format. Headers in sections should be in alphabetical order. Repository: rCTE Clang Tools Extra

[PATCH] D54262: [clang-tidy] Add `delete this` bugprone check (PR38741)

2018-11-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please also add regression test case. Is should also cover standalone function with this variable. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54262 ___ cfe-commits mailing list

[PATCH] D54262: [clang-tidy] Add `delete this` bugprone check (PR38741)

2018-11-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/bugprone-delete-this.rst:8 + +Said statement generates multiple problems, such as enforcing allocating the object via ``new``, or not

[PATCH] D54246: [clang-tidy] Add the abseil-duration-factory-scale check

2018-11-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:88 + Checks for cases where arguments to ``absl::Duration`` factory functions are + scaled internally and could be changed to a different factory function. This + check also looks for arguements with a

[PATCH] D54246: [clang-tidy] Add the abseil-duration-factory-scale check

2018-11-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/DurationFactoryScaleCheck.cpp:36 +GetScaleForFactory(llvm::StringRef FactoryName) { + static const auto *ScaleMap = + new std::unordered_map( This will cause memory leaks, so may be

[PATCH] D54222: [clang-tidy] Add a check to detect returning static locals in public headers

2018-11-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new check in Release Notes (in alphabetical order). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54222: [clang-tidy/checks] Add a checker to detect returning static locals in public headers

2018-11-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. C++ Core Guidelines also mentioned similar patterns, so may be this check belongs to bugprone module? Comment at: docs/clang-tidy/checks/llvm-problematic-statics.rst:7 + +Looks for functions defined in "public" headers that return the address

[PATCH] D54168: [clang-tidy] Zircon fbl::move -> std::move

2018-11-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:188 + + Suggests converting uses of ``fbl::move`` to + ``std::move``, and suggests inserting the header. Please try to fill as much as possible to 80 characters.

[PATCH] D54168: [clang-tidy] Zircon fbl::move -> std::move

2018-11-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/zircon/FblMoveCheck.cpp:61 +// Add in the header. +if (auto IncludeFixit = +Inserter->CreateIncludeInsertion(SM.getFileID(Start), "utility", Please don't use auto

[PATCH] D54169: [clang-tidy] Zircon ->

2018-11-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/zircon/FblLimitsCheck.cpp:111 + // Add in the header, since we know this file uses it. + if (auto IncludeFixit = Inserter->CreateIncludeInsertion( + SM.getFileID(V->getLocation()),

[PATCH] D54141: [clang-tidy] add deduplication support for run-clang-tidy.py

2018-11-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Reducing log file size is good idea, but I think will be also good idea to count duplicates. This will allow to concentrate clean-up efforts on place where most of warnings originate. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54141

[PATCH] D53974: [clang-tidy] new check: bugprone-too-small-loop-variable

2018-11-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/bugprone-too-small-loop-variable.rst:10 + + .. code-block:: c++ + JonasToth wrote: > ztamas wrote: > > JonasToth wrote: > > > the `.. code-block:: c++` is usually not indended, only the

[PATCH] D53974: [clang-tidy] new check: bugprone-too-small-loop-variable

2018-11-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:116 + + This check searches for those for loops which has a loop variable with + a "too small" type which means this type can't represent all values Please avoid This check, may be

[PATCH] D53974: [clang-tidy] new checker: bugprone-too-small-loop-variable

2018-11-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/TooSmallLoopVariableCheck.cpp:26 + + +/// \brief The matcher for loops with suspicious integer loop variable. Please remove unnecessary empty line. Comment at:

[PATCH] D53882: [clang-tidy] Adding Zircon checker for std namespace

2018-10-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:176 + + Warns when the `std` namespace is used, as its use is against Zircon's libc++ + policy for the kernel. JonasToth wrote: > alexfh wrote: > > JonasToth wrote: > > >

[PATCH] D53830: [clang-tidy]: Abseil: new check 'abseil-upgrade-duration-conversions'

2018-10-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp:22 +ast_matchers::MatchFinder *Finder) { + // For the arithmetic calls, we match only the uses of the templated operators + // where the template parameter is not a

[PATCH] D53771: [clang-tidy] Avoid C arrays check

2018-10-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-avoid-c-arrays.rst:6 +cppcoreguidelines-avoid-c-arrays += + Please make same length as header.

[PATCH] D53771: [clang-tidy] Avoid C arrays check

2018-10-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Will be good idea to add aliases at least for existing modules. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-10-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:142 + + Diagnoses local variable declarations declaring more than one variable and + tries to refactor the code to one statement per declaration. May be Finds or Detects like other checks?

<    2   3   4   5   6   7   8   9   10   >