[PATCH] D71594: testing clang-tidy

2019-12-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Where set of Clang-tidy checks come from? .clang-tidy? Could stricter set of custom rules be used? Comment at: clang/include/clang/Analysis/AnalysisDeclContext.h:527 -#endif // LLVM_CLANG_ANALYSIS_ANALYSISDECLCONTEXT_H +#endif

[PATCH] D71594: testing clang-tidy

2019-12-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D71594#1789275 , @goncharov wrote: > In D71594#1788194 , @Eugene.Zelenko > wrote: > > > Where set of Clang-tidy checks come from? .clang-tidy? Could stricter set > > of custom ru

[PATCH] D71686: Fix false positive in magic number checker

2019-12-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention fix in Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71686/new/ https://reviews.llvm.org/D71686 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D71707: clang-tidy: new bugprone-pointer-cast-widening

2019-12-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please add documentation and mention new check in Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71707/new/ https://reviews.llvm.org/D71707 ___ cfe-commits

[PATCH] D71707: clang-tidy: new bugprone-pointer-cast-widening

2019-12-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:100 + + Check for cast of a pointer to wider (even unsigned) integer. This will + sign-extend the pointer which happens on 32-bit hosts for 64-bit integers. Checks. One se

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

2019-12-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. May be also split table by checks groups? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36051/new/ https://reviews.llvm.org/D36051 ___ cfe-commits mailing list cfe-commi

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

2019-12-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/list.rst:291 + +.. csv-table:: Alias.. + :header: "Name", "Redirect", "Offers fixes", "Severity" Aliases? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D70876: [clang-tidy] Add spuriously-wake-up-functions check

2019-12-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-spuriously-wake-up-functions.rst:4 +bugprone-spuriously-wake-up-functions += + Please make length same as in title. Repository:

[PATCH] D75786: [clang-tidy] Move fuchsia-restrict-system-includes to portability module for general use.

2020-03-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:107 + + Moved fuchsia's restrict-system-includes check to portability to allow for + general use. I don't think that this statement is necessary. Commen

[PATCH] D75786: [clang-tidy] Move fuchsia-restrict-system-includes to portability module for general use.

2020-03-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:130 ^^ +- The 'fuchsia-restrict-system-headers' check was renamed to :doc:`portability-restrict-system-includes + Please insert empty line above. Repositor

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:101 +- New :doc:`bugprone-suspicious-includei + ` check. Please keep alphabetical order. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:104 + + F

[PATCH] D75332: [clang-tidy] Add module for llvm-libc and restrict-system-libc-header-check.

2020-03-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:100 + + Finds includes of sytem libc headers in llvm-libc implementation. + Please synchronize with first statement in documentation. Repository: rG LLVM Github Monorep

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/PlacementNewStorageCheck.cpp:19 + +namespace { +const ValueDecl *getDescendantValueDecl(const Stmt *TheStmt) { Please use static instead of anonymous namespaces for functions. See

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/PlacementNewStorageCheck.cpp:43 +} + + Unnecessary empty line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76229/new/ https://r

[PATCH] D73580: [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks section

2020-01-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D73580#1852032 , @njames93 wrote: > It looks good, but could you maybe create a child revision showing what it > looks like with a few checks renamed to make sure everything is all working > correctly. I think it'll b

[PATCH] D73580: [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks section

2020-02-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Another side effect is that rename_check.py messes list.rst by removing "Offer fixes". Probably proper solution would be moving update_checks_list from add_new_check.py to shared module. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Herald added a subscriber: wuzish. How about .cc and .cxx extension? It'll be reasonable to provide option to configure list of extensions. Please add documentation and mention new check in Release Notes. Comment at: clang-tools-extra/clang-tid

[PATCH] D71001: [clang-tidy] New check: bugprone-misplaced-pointer-arithmetic-in-alloc

2020-01-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-misplaced-pointer-arithmetic-in-alloc.rst:15 + +void bad_malloc(int n) { + char *p = (char*) malloc(n) + 10; Identification. I think 2 character should b

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

2020-01-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-prefer-member-initializer.rst:72 + +C(int nn, int mm) : n(nn) { + if (dice()) Please make indentation 2 characters, same as in above code snippe

[PATCH] D72848: Remove some SVN-specific code.

2020-01-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/lib/Basic/Version.cpp:33 #else - StringRef URL(""); + return ""; #endif return {} should be better. Comment at: clang/lib/Basic/Version.cpp:42 #else - StringRef URL(""); + return ""

[PATCH] D72848: Remove some SVN-specific code.

2020-01-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/lib/Basic/Version.cpp:33 #else - StringRef URL(""); + return ""; #endif hans wrote: > Eugene.Zelenko wrote: > > return {} should be better. > Why? I think "" is clearer for a string. It's default non-tri

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

2020-01-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-oop57-cpp.rst:25 + Default is an empty string. + The check will detect the following functions: + `std::memcpy`, `memcpy`, `std::memmove`, `memmove`, `std::strcpy`, -

[PATCH] D73203: [clang-tidy] Prevent a remove only fixit causing a conflict when enclosed by another fixit

2020-01-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:726 + unsigned ErrorIndex = ErrorAndDiscarded.first; + const auto &Discarded = ErrorAndDiscarded.second; + if (!Apply[ErrorIndex]) Please

[PATCH] D73270: [clang-tidy] Fix false positive in bugprone-infinite-loop

2020-01-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:179 + if (const auto *While = dyn_cast(LoopStmt)) { +if (const auto *LoopVarDecl = While->getConditionVariable()) { + if (const Expr *Init = LoopVarDecl->getIni

[PATCH] D73300: [clang-tidy] Add library for clang-tidy main function

2020-01-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.h:5 +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. License seems to be old. ==

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/MissingHeaderFileDeclarationCheck.cpp:14 +#include "llvm/ADT/Optional.h" +#include "llvm/ADT/StringSwitch.h" +#include Please also include StringRef. Comment

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D73413#1843368 , @njames93 wrote: > In D73413#1843103 , @alexfh wrote: > > > How is this different from `-Wmissing-prototypes`? > > > This checks variables too, and it looks for a

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

2020-01-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Just ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72527/new/ https://reviews.llvm.org/D72527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

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

2020-01-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. As I wrote, I don't have GitHub commit access, so I need help with commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72527/new/ https://reviews.llvm.org/D72527 ___ c

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

2020-01-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko updated this revision to Diff 240922. Eugene.Zelenko added a comment. Rebase from master. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72527/new/ https://reviews.llvm.org/D72527 Files: clang-tools-extra/clang-tidy/add_new_check.p

[PATCH] D73580: [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks section

2020-01-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: alexfh, hokein, aaron.ballman, njames93, MyDeveloperDay. Eugene.Zelenko added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. Herald added a project: clang. Also use //check// in add_new_check.py for termino

[PATCH] D73762: [clang] New warning for for-loops where the iteration does not match the loop condition

2020-01-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It's good question where this check belongs. There are two loop related checks in CLang-tidy: bugprone-infinite-loop and bugprone-too-small-loop-variable. Comment at: clang/lib/Sema/SemaStmt.cpp:1754 +if (!Cond->isRelationalOp()) return; +

[PATCH] D73762: [clang] New warning for for-loops where the iteration does not match the loop condition

2020-01-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Check should also consider cases like: i += 2; i = i + 2; i -= 2; i = i - 2. Probably same with multiplications, divisions and shifts. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73762/new/ https://reviews.llvm.or

[PATCH] D73775: [clang-tidy] Cover cases like (b && c && b) in the redundant expression check

2020-01-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp:335 +return AsTExpr; + else +return nullptr; Please don;e use else after return. Comment at: clang-tools-extra/clang-tidy/

[PATCH] D44694: [clang-tidy] Use :doc: for check links in Release Notes

2018-03-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: alexfh, hokein, aaron.ballman. Eugene.Zelenko added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. I learned from https://reviews.llvm.org/D44636 of shorter links to documentation, which could be used for C

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:127 +- Added `VariableThreshold` option to `readability-function-size + `_ check Please rebase from trunk an

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:73 +- New `bugprone-parent-virtual-call + `_ check Please rebase from trunk and use //:doc:// for link.

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:68 +- New :doc:`bugprone-exception-escape + ` check + Please fix link. See other checks as example. https://

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

2018-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:62 - New `bugprone-throw-keyword-missing `_ check Please rebase from trunk and use //:doc:// for lin

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. This duplicates Clang-tidy misc-unused-using-decls . If Clang will provide same or better functionality, it should be removed. Repository: rC Clang https://reviews.llvm.org/D44826

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please also mention new warning in Release Notes and documentation. Will this warning be part of -Wall or -Wextra? Repository: rC Clang https://reviews.llvm.org/D44826 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst:26 + +This boolean flag disables all warnings for macros and checks only that +macro names are CAPS_ONLY. This option is meant to ease introduction of this ---

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst:24 + +.. option:: CheckCapsOnly + Will be good idea to generalize this option with other check which deal with macros. Repository: rCTE Clang Tools Ext

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D41648#1048312, @JonasToth wrote: > Which checks do you have in mind? bugprone-macro-*, bugprone-multiple-statement-macro. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41648 _

[PATCH] D44912: [clang-doc] Removing -Wunused-variable warning

2018-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think it's fine to commit trivial fixes without going via review. Repository: rL LLVM https://reviews.llvm.org/D44912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new tool in Release Notes and use //:doc:// to refer to its manual. https://reviews.llvm.org/D43341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D44948: Add diagnostic -Waggregate-ctors, "aggregate type has user-declared constructors"

2018-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new diagnostics in documentation and Release Notes. Repository: rC Clang https://reviews.llvm.org/D44948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:68 +- New :doc:`bugprone-exception-escape + ` check + .html is not necessary. https://reviews.llvm.org/D33537 ___ cfe-commits mailing list cf

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

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:137 + +- New `readability-unnecessary-intermediate-var + `_ check Please use alphabetic order

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.h:30 void check(const ast_matchers::MatchFinder::MatchResult &Result) override; +private: void memAllocFuncFix(StringRef Name, Please insert empty line above.

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:21 + +std::string exprToStr(const Expr *Expr, + const MatchFinder::MatchResult &Result) { Please make it static. Same for other functions.

[PATCH] D45059: Add a clang-tidy check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/ComparisonInTempFailureRetryCheck.cpp:51 +} +} + Please add // namespace and remove one empty line below. Comment at: docs/ReleaseNotes.rst:60 +- New `bugprone-comparison-i

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Will be good idea to clarify where TEMP_FAILURE_RETRY come from. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:46 +/// from ' "data_name", "data", ' to just 'data' by "memmoving" it char-by-char. +bool isTrimFunc(const MatchFinder::MatchResult &Result) { + const auto *FuncExpr = Result

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New module `abseil` for checks related to the `Abseil `_ + library. Looks like you copied new version of file over old one. svn update and svn diff should be made

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

2018-03-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/UnnecessaryIntermediateVarCheck.cpp:1 +//===--- UnnecessaryIntermediateVarCheck.cpp - +// clang-tidy--===// Please make fit line into 80 characters and remove incorrect c

[PATCH] D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'

2018-04-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. If this is Apple guideline, check name should reflect this. I think will be good idea to have general check for Apple naming conventions instead of separate checks for specific situations like //objc-ivar-declaration// and //objc-property-declaration//. ==

[PATCH] D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'

2018-04-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D45392#1060845, @Wizard wrote: > In https://reviews.llvm.org/D45392#1060485, @Eugene.Zelenko wrote: > > > If this is Apple guideline, check name should reflect this. I think will be > > good idea to have general check for Apple naming c

[PATCH] D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'

2018-04-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D45392#1060912, @Wizard wrote: > In https://reviews.llvm.org/D45392#1060854, @Eugene.Zelenko wrote: > > > In https://reviews.llvm.org/D45392#1060845, @Wizard wrote: > > > > > In https://reviews.llvm.org/D45392#1060485, @Eugene.Zelenko wr

[PATCH] D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'

2018-04-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D45392#1061064, @Wizard wrote: > In https://reviews.llvm.org/D45392#1060971, @Eugene.Zelenko wrote: > > > In https://reviews.llvm.org/D45392#1060912, @Wizard wrote: > > > > > In https://reviews.llvm.org/D45392#1060854, @Eugene.Zelenko wr

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

2018-04-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be good idea to have option to apply this check for pointer/references only, or include built-in types/enums. Comment at: clang-tidy/cppcoreguidelines/ConstCheck.cpp:13 +#include "clang/ASTMatchers/ASTMatchFinder.h" + +#include --

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

2018-04-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Will be good idea to add HICPP alias. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[PATCH] D45468: [clang-tidy] Adding Fuchsia checker for human-readable logging

2018-04-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/zircon-human-readable-status.rst:6 + +Suggests fix for printf-family functions with a zx_status_t argument to convert +status argument to a human-readable string (zx_status_t is a Zircon kernel -

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

2018-04-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D45444#1063291, @JonasToth wrote: > > It'll be good idea to have option to apply this check for > > pointer/references only, or include built-in types/enums. > > Agreed. I aim at a `mark handles const`(default on), `mark values > const

[PATCH] D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'

2018-04-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. How about doing same for //objc-property-declaration//? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please split this review with one check per review. Comment at: docs/ReleaseNotes.rst:83 + + Check to prevent creation of statically-stored objects in Fuchsia. + Please fix double space Comment at: docs/clang

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fuchsia/FuchsiaTidyModule.cpp:31 + void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { + +CheckFactories.registerCheck( Please remove empty line. Comment a

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new module in docs/clang-tidy/index.rst. Repository: rL LLVM https://reviews.llvm.org/D40108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 + Prevent use of default arguments in declared or called functions in Fuchsia. + Check name and link was accidentally removed. Comment at: docs/clang-tidy/checks/list

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Does Fuchsia coding conventions allows default parameters in class methods? If not, test should reflect this Comment at: docs/ReleaseNotes.rst:63 + + Prevent use of default arguments in declared or called functions in Fuchsia. + ---

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D40108#928212, @juliehockett wrote: > We do need to figure out what the right prefix for these checks is (whether > fuchsia-* since they'll be used under the Fuchsia umbrella, zircon-* since > the follow the Zircon section of the style

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:63 + + Warns if a function is declared or called with default arguments. + I think will be good idea to change to //function// to //function or method//. Same in documentation. ==

[PATCH] D146288: clang-tidy: Detect use-after-move in CXXCtorInitializer

2023-03-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:190 +- Improved :doc:`bugprone-use-after-move + ` check to also cover constructor Please keep alphabetical order (by check name) in this section. CHANGES SINCE LAST ACT

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-03-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReferenceToConstructedTemporaryCheck.cpp:22 + bool operator()(const internal::BoundNodesMap &Nodes) const { +auto *Other = Nodes.getNode(ID).get(); +if (!Other) `

[PATCH] D146655: [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name

2023-03-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:237 +- Fixed an issue in :doc:`google-avoid-underscore-in-googletest-name + ` when using Please keep alphabetical order (by check name) in this section. Repository: r

[PATCH] D146713: [clang-tidy][NFC] Improve naming convention in google-readability-avoid-underscore-in-googletest-name

2023-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko accepted this revision. Eugene.Zelenko added a comment. This revision is now accepted and ready to land. But will be good idea to give a chance to other reviewers to take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146713/ne

[PATCH] D146655: [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name

2023-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:237 +- Fixed an issue in :doc:`google-avoid-underscore-in-googletest-name + ` when using carlosgalvezp wrote: > PiotrZSL wrote: > > carlosgalvezp wrote: > > > Eugene.Zele

[PATCH] D146655: [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name

2023-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:237 +- Fixed an issue in :doc:`google-avoid-underscore-in-googletest-name + ` when using Eugene.Zelenko wrote: > carlosgalvezp wrote: > > PiotrZSL wrote: > > > carlosgalv

[PATCH] D146712: [clang-tidy] Add portability-non-portable-integer-constant check

2023-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please add alias entry in Release Notes. Comment at: clang-tools-extra/clang-tidy/portability/NonPortableIntegerConstantCheck.cpp:95 + + +void NonPortableIntegerConstantCheck::check( Excessive newline. Comment

[PATCH] D146655: [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name

2023-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:237 +- Fixed an issue in :doc:`google-avoid-underscore-in-googletest-name + ` when using carlosgalvezp wrote: > Eugene.Zelenko wrote: > > Eugene.Zelenko wrote: > > > carl

[PATCH] D146655: [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name

2023-03-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:237 +- Fixed an issue in :doc:`google-avoid-underscore-in-googletest-name + ` when using carlosgalvezp wrote: > Eugene.Zelenko wrote: > > carlosgalvezp wrote: > > > Eugen

[PATCH] D144522: [clang-tidy] Add readability-operators-representation check

2023-03-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:139 + + Check helps enforce consistent token representation for invoked binary, + unary and overloaded operators in C++ code. Please omit `Check`. Comme

[PATCH] D145617: [clang-tidy] Add readability-avoid-unconditional-preprocessor-if check

2023-03-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:139 + + Check flags always enabled or disabled code blocks in preprocessor ``#if`` + conditions, such as ``#if 0`` and ``#if 1`` etc. Please omit `Check`. ==

[PATCH] D146904: [clang-tidy] Fix extern fixes in readability-redundant-declaration

2023-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp:84 + SourceLocation BeginLoc; + if (const LinkageSpecDecl *Extern = + Result.Nodes.getNodeAs("extern"); `auto` could b

[PATCH] D146922: [clang-tidy] Fix false positve for defaulted move constructor in performance-noexcept-move-constructor

2023-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/performance/noexcept-move-constructor-fix.cpp:64 // CHECK-FIXES: ){{.*}}noexcept{{.*}} {} \ No newline at end of file Please add. Repository: rG LLVM Github Monore

[PATCH] D146921: [clang-tidy] Implement cppcoreguidelines F.19

2023-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:127 + + Warns when a forwarding reference parameter is not forwarded within the function body. + Please follow 80 characters limit for text. Repository: rG LLVM Github

[PATCH] D146947: [docs][clang] Added extra information inside the flag -fsanitize=unsigned-shift-base for UndefinedBehaviorSanitizer Fix : #60712

2023-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/docs/UndefinedBehaviorSanitizer.rst:160 - ``-fsanitize=unsigned-shift-base``: check that an unsigned left-hand side of - a left shift operation doesn't overflow. + a left shift operation doesn't overflow.Issues

[PATCH] D145581: [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments.

2023-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:222 -- Improved :doc:`bugprone-use-after-move - ` to understand that there is a - sequence point between designated initializers. +- In :doc:`bugprone-use-after-move + `: --

[PATCH] D147081: [clang-tidy] Fix issues in bugprone-assert-side-effect

2023-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp:66 + + const auto *FuncDecl = CExpr->getDirectCallee(); + if (!FuncDecl || !FuncDecl->getDeclName().isIdentifier()) Please do not use `auto` if typ

[PATCH] D147081: [clang-tidy] Fix issues in bugprone-assert-side-effect

2023-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp:66 + + const auto *FuncDecl = CExpr->getDirectCallee(); + if (!FuncDecl || !FuncDecl->getDeclName().isIdentifier()) PiotrZSL wrote: > Eugene.Zelenk

[PATCH] D144748: [clang-tidy] Add bugprone-empty-catch check

2023-02-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EmptyCatchCheck.cpp:77 +void EmptyCatchCheck::registerMatchers(MatchFinder *Finder) { + + auto AllowedNamedExceptionDecl = Excessive newline. Comment at:

[PATCH] D144748: [clang-tidy] Add bugprone-empty-catch check

2023-02-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/empty-catch.rst:169 +should be provided. If an exception type name in the list is caught in an +empty catch statement, no warning will be raised. Default value: `` (empty

[PATCH] D142587: [clang-tidy] Improved too-small-loop-variable with bit-field support

2023-02-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. @carlosgalvezp: Sorry, there are too much Clang specifics in this patch, so I could not be reviewer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142587/new/ https://reviews.llvm.org/D142587 __

[PATCH] D145138: [clang-tidy] Implement FixIts for C arrays

2023-03-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp:94 + + auto StartOfFile = SM.getLocForStartOfFile(SM.getFileID(Location)); + while (Location != StartOfFile) { Please do not use `auto` unless type is

[PATCH] D145138: [clang-tidy] Implement FixIts for C arrays

2023-03-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp:588 +: ClangTidyCheck(Name, Context), + IncludeInserter(Options.getLocalOrGlobal("IncludeStyle", + utils::IncludeS

[PATCH] D145581: [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments.

2023-03-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp:1379 +}; \ No newline at end of file Please add. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D145617: [clang-tidy] Add readability-avoid-unconditional-preprocessor-if check

2023-03-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/AvoidUnconditionalPreprocessorIfCheck.cpp:29 + return; +auto &SM = PP.getSourceManager(); +if (!isStatic(SM, PP.getLangOpts(), ConditionRange)) Please don't u

[PATCH] D145720: [clang-tidy] Finish cppcoreguidelines-avoid-capturing-lambda-coroutines check

2023-03-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:126 - Adds check for cpp core guideline: "CP.51: Do not use capturing lambdas that - are coroutines." - + Check flags C++20 coroutine lambdas with non-empty capture lists that may + ca

[PATCH] D145865: [clang-tidy] Multiple fixes to bugprone-exception-escape

2023-03-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:491 if (const auto *ThrownExpr = Throw->getSubExpr()) { - const auto *ThrownType = - ThrownExpr->getType()->getUnqualifiedDesugaredType(); - if (Thro

[PATCH] D153423: [clang-tidy] Allow explicit throwing in bugprone-exception-escape for special functions

2023-06-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/exception-escape.rst:29 +and destructors, it is a clear indication of the developer's intention and +should be respected.. + Double period. Repository: rG LLV

<    3   4   5   6   7   8   9   10   >