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

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

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

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

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

[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

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

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

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

[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

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

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

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

[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 ) { - auto *Ty = T->getAs(); - if (!Ty) -return nullptr; - return Ty->getDecl()->getDefinition(); + if (const auto *D =

[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

[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

[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

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

[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

[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

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

[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

[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

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

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

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

[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

[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] D61749: [clang-tidy] initial version of readability-static-const-method

2019-05-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added subscribers: JonasToth, Eugene.Zelenko. Eugene.Zelenko added a comment. @JonasToth tried to implement const check, so probably const and static part should be split. It's hard to tell about state of existing implementation, but you could continue it or at least borrow ideas

[PATCH] D61508: [clang-tidy] misc-header-guard : a simple version of llvm-header-guard

2019-05-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/misc/HeaderGuardCheck.cpp:21 + StringRef OldGuard) { + if (OldGuard.size()) { +return OldGuard; Please use early return. Comment

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-05-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp:16 +#include "llvm/Support/FormatVariadic.h" + +#include Unnecessary empty line. Comment at:

[PATCH] D61386: [clang-tidy] Add support writing a check as a Transformer rewrite rule.

2019-05-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/TransformerTidy.cpp:51 + DiagnosticBuilder Diag = diag(RootLoc, Message); + for (const tooling::Transformation : *Transformations) { +Diag << FixItHint::CreateReplacement(T.Range,

[PATCH] D61386: [clang-tidy] Add support writing a check as a Transformer rewrite rule.

2019-05-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/TransformerTidy.cpp:22 + // Verify the existence and validity of the AST node that roots this rule. + auto = Result.Nodes.getMap(); + auto Root = NodesMap.find(tooling::RewriteRule::RootId);

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-04-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp:29 + +bool isMessageExpressionInsideMacro(const ObjCMessageExpr *Expr) { + SourceLocation ReceiverLocation = Expr->getReceiverRange().getBegin();

[PATCH] D61209: [clang-tidy] Fix readability-redundant-smartptr-get for MSVC STL

2019-04-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/readability-redundant-smartptr-get-msvc.cpp:37 +void Positive() { + + std::unique_ptr* up; Unnecessary empty line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D61209: [clang-tidy] Fix readability-redundant-smartptr-get for MSVC STL

2019-04-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/readability-redundant-smartptr-get-msvc.cpp:96 +} \ No newline at end of file Please add new line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2019-04-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:148 + + FIXME: add release notes. + Please add short description. Should be same as first statements in documentation. Repository: rG LLVM Github Monorepo CHANGES

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

2019-04-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-redundant-access-specifiers.rst:34 + If set to non-zero, the check will also give warning if the first access + specifier declaration is redundant (e.g. `private` inside

[PATCH] D60629: [clang-tidy] Change the namespace for llvm checkers from 'llvm' to 'llvm_checker'

2019-04-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please use check for consistency with rest of Clang-tidy. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60629/new/ https://reviews.llvm.org/D60629 ___ cfe-commits

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-self-assignment.rst:6 + +"cert-oop54-cpp" redirects here as an alias for this check. + Please use back-tick to highlight cert-oop54-cpp.

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

2019-04-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-wrap-unique.rst:5 +== +Looks for instances of factory functions which uses a non-public constructor +that returns a ``std::unqiue_ptr`` then recommends using ``absl::wrap_unique(new

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

2019-04-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/WrapUniqueCheck.cpp:85 + +std::string Left = (ConsDecl) ? "auto " + NameRef.str() + " = " : ""; +std::string NewText = I don't think that you need round brackets around ConsDecl. Same

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp:20 +void UnhandledSelfAssignmentCheck::registerMatchers(MatchFinder *Finder) { + + // We don't care about deleted, default or implicit operator

[PATCH] D60139: [clang-tidy] Add bugprone-placement-new-target-type-mismatch check

2019-04-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/PlacementNewTargetTypeMismatch.cpp:38 + const CastExpr *Cast = dyn_cast(PlacementExpr); + if (nullptr == Cast) { +return; JonasToth wrote: > braces, above the comment does not follow the

[PATCH] D60139: [clang-tidy] Add misc-placement-new-target-type-mismatch check

2019-04-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:136 + + Finds placement-new calls where the size of the pointee type of the placement + parameter is smaller than the size of the constructed type and the pointer is Please synchronize

[PATCH] D60139: [clang-tidy] Add misc-placement-new-target-size check

2019-04-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/misc-placement-new-target-size.rst:5 +== + + Eugene.Zelenko wrote: > Unnecessary empty line. Somehow empty line is still there. CHANGES SINCE LAST ACTION

[PATCH] D59802: [clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals

2019-04-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/llvm-prefer-isa-or-dyn-cast-in-conditionals.rst:6 + + Looks at conditionals and finds cases of ``cast<>``, which will + assert rather than return a null pointer, and ``dyn_cast<>``

[PATCH] D60139: [clang-tidy] Add misc-placement-new-target-size check

2019-04-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/misc/PlacementNewTargetSizeCheck.cpp:10 +#include + +#include "PlacementNewTargetSizeCheck.h" Unnecessary empty line. Please run Clang-format after fixing. Comment at:

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

2019-04-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D59802#1450185 , @xbolva00 wrote: > Do we have any checker to recommend llvm functions over std ? > > e.g. llvm::sort, llvm::all_of, ... No. Actually LLVM coding conventions support is very limited. See

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

2019-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D59802#1447108 , @hintonda wrote: > It's good idea to follow modernize-use-auto convention without introducing exceptions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2019-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/AvoidCastInConditionalCheck.cpp:73 + Result.Nodes.getNodeAs("cast-assign")) { +auto StartLoc = MatchedDecl->getCallee()->getExprLoc(); +auto EndLoc =

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

2019-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think linuxkernel name will be less ambiguous. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59963/new/ https://reviews.llvm.org/D59963 ___ cfe-commits mailing list

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D59932#1446533 , @JonasToth wrote: > I think the idea is good and implementation, too. If we iterate all checks > anyway (probably?) we could think about adding a severity to the checks, too? > > I know that

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/ClangTidyCheck.h:107 + /// fixes for different cases. + /// - clang compiler diagnostics and clang static analyzer diagnostics are + /// not supported. I think Clang and Clang Static

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/ClangTidyCheck.h:109 + /// not supported. + virtual llvm::StringRef fixDescription() { return ""; } + return {} could be used instead. Comment at:

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

2019-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/WrapUniqueCheck.h:26 +private: + // std::string getArgs(const SourceManager *SM, const CallExpr *MemExpr); + Please remove obsolete commend and private keyword. Comment at:

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/lib/Tooling/Syntax/TokenBuffer.cpp:323 + PP.getLangOpts(), Tokens); + auto *CB = CBOwner.get(); + ilya-biryukov wrote: > Eugene.Zelenko wrote: > > Return type

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/lib/Tooling/Syntax/TokenBuffer.cpp:8 +//===--===// +#include "clang/Tooling/Syntax/TokenBuffer.h" +#include "clang/Basic/Diagnostic.h"

[PATCH] D59870: [clang-tidy] Add MagnitudeBitsUpperLimit option to bugprone-too-small-loop-variable

2019-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:122 +- The :bugprone-too-small-loop-variable + ` now supports :doc prefix and ` is missing. Please also rebase patch from trunk. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST

[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/docs/ReleaseNotes.rst:113 + + Finds invocations of `-self` on super instances in initializers of subclasses + of `NSObject` and recommends calling a superclass initializer instead. Please use

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

2019-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/llvm-avoid-cast-in-conditional.rst:8 +statements which will assert on failure in Debug builds. The use of +cast<> implies that the operation cannot fail, and should not be used +as the

[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

  1   2   3   4   5   >