[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. Looks good to me, consider adding info to Release notes, that this check has been improved/fixed support for designated initializers. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Regarding release-notes: I would probably wrote something like "fixed handling for designated initializers", nonene will understand things like "sequence point". If you decide to change this, the just commit this as an [NFC] without review. And checks in this section sho

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

2023-03-17 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I will check this more deeply during weekend. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146288/new/ https://reviews.llvm.org/D146288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

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

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL requested changes to this revision. PiotrZSL added a comment. This revision now requires changes to proceed. Requesting changes due to lack of support for base class initializes & got some concerns related lambdas used in initializers. Comment at: clang-tools-extra/cl

[PATCH] D145958: [clang-tidy] Fix minor bug in bugprone-too-small-loop-variable

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG113f0190dd38: [clang-tidy] Fix minor bug in bugprone-too-small-loop-variable (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145958/new

[PATCH] D129070: [clang-tidy] Fixed an issue in readability-identifier-naming not using options specified.

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3ed40ac90ce8: [clang-tidy] Fixed an issue in readability-identifier-naming not using options… (authored by njames93, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D129070?vs

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

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/operators-representation.rst:16 +To configure the check to enforce the traditional token representation, you can +set the `BinaryOperators` and `OverloadedOperators` options to ``&&,

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

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/avoid-unconditional-preprocessor-if.cpp:67-69 +#if 10 > DDD +// some code +#endif carlosgalvezp wrote: > Add case for if 10 < DDD ? > > Also, add test case for co

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

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 506304. PiotrZSL marked 3 inline comments as done. PiotrZSL added a comment. Removed some whitespace & added tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145617/new/ https://reviews.llvm.org/D145617 Fi

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

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 506310. PiotrZSL added a comment. Change name of isStatic* to isImmutable* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145617/new/ https://reviews.llvm.org/D145617 Files: clang-tools-extra/clang-tidy/rea

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

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Detects code where a te

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

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. There are 2 issues found in llvm repository: - llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp:721:22: warning: reference variable 'S' extends the lifetime of a just-constructed temporary object 'const StringRef', consider changing reference to value [readability-reference-t

[PATCH] D144912: [clang-tidy] readability-identifier-naming: fix hungarian enum prefix in C

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd4cb6c208231: [clang-tidy] readability-identifier-naming: fix hungarian enum prefix in C (authored by amurzeau, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

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

2023-03-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. Update documentation, and config examples, add "Traditional Tokens Representation" section. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/operators-representation.rst:159 +Configuratio

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

2023-03-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 506398. PiotrZSL added a comment. Update documentation, changed default check configuration. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144522/new/ https://reviews.llvm.org/D144522 Files: clang-tools-ext

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

2023-03-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 506399. PiotrZSL marked 3 inline comments as done. PiotrZSL added a comment. Review comment fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 Files: clang-tool

[PATCH] D146396: [clang-tidy] Use checks dependences for Analyzer checks

2023-03-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project

[PATCH] D146396: [clang-tidy] Use checks dependences for Analyzer checks

2023-03-20 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I have feeling that hidden checks that none other check depend on should be enabled by default. Also I have feeling that those hidden checks shouldn't be visible to end user. But need to confirm this first with Static Analyser developers. Repository: rG LLVM Github M

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

2023-03-20 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp:1304 + std::unique_ptr a; + a->foo(std::move(a)); +} mboehme wrote: > PiotrZSL wrote: > > What about scenario like this: > > > > ``` > > b.foo(a

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

2023-03-20 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp:400 void UseAfterMoveCheck::registerMatchers(MatchFinder *Finder) { auto CallMoveMatcher = + callExpr( MarcoFalke wrote: > PiotrZSL wrote: > > This is

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

2023-03-20 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp:1431 std::string val_; }; MarcoFalke wrote: > PiotrZSL wrote: > > Missing tests: > > - Test with A derive from B, C, D, and argument is moved i

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

2023-03-20 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp:1431 std::string val_; }; MarcoFalke wrote: > PiotrZSL wrote: > > MarcoFalke wrote: > > > PiotrZSL wrote: > > > > Missing tests: > > > > - Test

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

2023-03-20 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. Overall LGTM, give it few days, maybe something will pop up. I will try to run this change on my project and check if it finds any false-positives or real-issues. CHANGES SINCE LAST ACTIO

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

2023-03-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp:1304 + std::unique_ptr a; + a->foo(std::move(a)); +} mboehme wrote: > PiotrZSL wrote: > > mboehme wrote: > > > PiotrZSL wrote: > > > > What about

[PATCH] D146520: [clang-tidy] Fix checks filter with warnings-as-errors

2023-03-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. Looks fine, and looks like it's working. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146520/new/ https://reviews.llvm.org/D146520 ___

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

2023-03-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/google/avoid-underscore-in-googletest-name.cpp:90 // Underscores are allowed to disable a test with the DISABLED_ prefix. -// https://github.com/google/googletest/blob/master/googletest/docs

[PATCH] D130181: [clang-tidy] Add readability-use-early-exits check

2023-03-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/UseEarlyExitsCheck.cpp:359 +void UseEarlyExitsCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher(translationUnitDecl(), this); +} This will trigger on all syste

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

2023-03-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL 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: > > Please keep alphabetical order (by che

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

2023-03-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL requested changes to this revision. PiotrZSL added a comment. This revision now requires changes to proceed. Switching status of review, once you will be ready with changes (or your decision), just mark it ready for review again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

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

2023-03-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/portability/NonPortableIntegerConstantCheck.cpp:92 +void NonPortableIntegerConstantCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher(integerLiteral().bind("integer"), this); +} --

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

2023-03-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/google/avoid-underscore-in-googletest-name.cpp:10 TEST(TestCaseName, Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: avoid using "_" in t

[PATCH] D146396: [clang-tidy] Use checks dependences for Analyzer checks

2023-03-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. Verify with Static Analyser developers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146396/new/ https://reviews.llvm.org/D146396 ___

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

2023-03-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL requested changes to this revision. PiotrZSL added a comment. This revision now requires changes to proceed. Additionally, fix build. Once you finish making changes to this review, switch it back to ready for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D146842: [clang-tidy] Fix crash when handling invalid config values

2023-03-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Currently due to missin

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

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. @carlosgalvezp Do you want me to shorten documentation ? Or we leave it like it is ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145617/new/ https://reviews.llvm.org/D145617

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

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 508302. PiotrZSL added a comment. Rebase + Shorten documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145617/new/ https://reviews.llvm.org/D145617 Files: clang-tools-extra/clang-tidy/readability/A

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

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 8 inline comments as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/OperatorsRepresentationCheck.cpp:220 + if (!isAnyOperatorEnabled(OverloadedOperators, OperatorsRepresentation) && + isAnyOperatorEnabled(Overload

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

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 508303. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Rebase + Fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144522/new/ https://reviews.llvm.org/D144522 Files: clang-too

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

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 508310. PiotrZSL added a comment. Fixes in documentation & clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144522/new/ https://reviews.llvm.org/D144522 Files: clang-tools-extra/clang-tidy/readabi

[PATCH] D146875: [clang-tidy] Fix example provided by add_new_check.py

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Currently test for newl

[PATCH] D146875: [clang-tidy] Fix example provided by add_new_check.py

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 508315. PiotrZSL edited the summary of this revision. PiotrZSL added a comment. Added issue reference Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146875/new/ https://reviews.llvm.org/D146875 Files: clang-

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

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 508320. PiotrZSL added a comment. Doc update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145617/new/ https://reviews.llvm.org/D145617 Files: clang-tools-extra/clang-tidy/readability/AvoidUnconditionalPre

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

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 508321. PiotrZSL added a comment. Fix doc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145617/new/ https://reviews.llvm.org/D145617 Files: clang-tools-extra/clang-tidy/readability/AvoidUnconditionalPrepro

[PATCH] D146881: [clang-tidy] Fix findNextTokenSkippingComments & rangeContainsExpansionsOrDirectives

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. findNextTokenSkippingCo

[PATCH] D146882: [clang-tidy] Correct union & macros handling in modernize-use-equals-default

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. To this moment this che

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

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. To be honest, that's lot of hard to understand code that at start is unmaintainable. I don't see anyone even trying to understand all this and do some fixes in future. Consider some refactoring, to reduce amount of code, split it into some functions, add some comments

[PATCH] D146887: [clang-tidy] Fix if-constexpr false-positive in readability-misleading-indentation

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. When depend on templat

[PATCH] D146888: [clang-tidy] Flag std::forward on non-forwarding references

2023-03-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. First, https://reviews.llvm.org/D144347 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146888/new/ https://reviews.llvm.org/D146888 ___ cfe-commits mailing list cfe-commits@lists

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

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Currently check does no

[PATCH] D146913: [clang-tidy] Add option to ignore user-defined literals in readability-magic-numbers

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.h:52-59 + bool isUserDefinedLiteral( + const clang::ast_matchers::MatchFinder::MatchResu

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

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG52296f5ed88b: [clang-tidy] Add readability-avoid-unconditional-preprocessor-if check (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D145617?vs=508321&id=508408#toc Repository

[PATCH] D146882: [clang-tidy] Correct union & macros handling in modernize-use-equals-default

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeb87e55c9aad: [clang-tidy] Correct union & macros handling in modernize-use-equals-default (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

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

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 508411. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Use auto Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146904/new/ https://reviews.llvm.org/D146904 Files: clang-tools-extra/clan

[PATCH] D144347: [clang-tidy] Add readability-forward-usage check

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D144347#4222534 , @ccotter wrote: > Is it worth adding a cppcoreguidelines alias (ES.56)? Yes, you can pull this change (arc patch D144347 --nobranch) and create change that would depend o

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

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL requested changes to this revision. PiotrZSL added a comment. This revision now requires changes to proceed. Current solution is invalid, defaulted move constructors can throw by default. There are 2 more issues for this case: https://github.com/llvm/llvm-project/issues/38081 https://gith

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

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Update ReleaseNotes for this check, and validate documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146922/new/ https://reviews.llvm.org/D146922 ___ cfe-commits mailin

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

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. maybe some other name for check, like missing-std-forward. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ForwardingReferenceParamNotForwardedCheck.cpp:62 + namedDecl(hasUnderlyingDecl(hasName("::std::forward")), +

[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. What about classes that doesn't have begin/end method but got cbegin/cend ? I thing there is open issue for that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760 ___

[PATCH] D146929: [clang-tidy] Ignore unevaluated exprs in rvalue-reference-param-not-moved

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146929/new/ https://reviews.llvm.org/D146929 ___

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

2023-03-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ForwardingReferenceParamNotForwardedCheck.cpp:20 + +AST_MATCHER(Expr, hasUnevaluatedContext) { + if (isa(Node) || isa(Node)) move this matcher to some utils/... It may be

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

2023-03-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. And actually there is issue for this: https://github.com/llvm/llvm-project/issues/57758 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145581/new/ https://reviews.llvm.org/D145581 _

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

2023-03-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Don't waste time of Sema, no way to access it, as far as I know, it's already destroyed when checks are executed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146922/new/ https://reviews.llvm.org/D146922 ___

[PATCH] D146520: [clang-tidy] Fix checks filter with warnings-as-errors

2023-03-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D146520#4224281 , @aaron.ballman wrote: > Ideally, users should be able to disable the core checks from running at all > (the reason users want to disable checks is both because of the diagnostics > they produce and because

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2023-03-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. To be honest, i got this check implemented and running already on some big code base since years, and inserted few thousands of std::move's with 0 false-positives, maybe not finding all cases, but I'm satisfied. I will put here source code, maybe you will get some idea

[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-03-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D140760#4226213 , @ccotter wrote: > Should we handle that in a separate patch? Ok. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760

[PATCH] D146929: [clang-tidy] Ignore unevaluated exprs in rvalue-reference-param-not-moved

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbd7628461b3f: [clang-tidy] Ignore unevaluated exprs in rvalue-reference-param-not-moved (authored by ccotter, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D146885: [clang-tidy][NFC] add debug log when clean empty namespace

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL requested changes to this revision. PiotrZSL added a comment. This revision now requires changes to proceed. This shouldn't be delivered. Do such tests, locally, instead of committing them. This change impact clang, and all tools, not only clang-tidy, therfor [clang-tidy] prefix is misle

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

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Try to move some code to separate file, some utilty/... Add tests with tyepdefs. Add tests with class derive from type that it gets from template. Probably this code will be used in few more checks in future. try implement some virtual base validation, add some cache so

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

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL requested changes to this revision. PiotrZSL added a comment. This revision now requires changes to proceed. Try refactoring code a lite bit, check suggestions, add tests for typedefs, and inheritance from template type. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D147062: [clang-tidy] Add option to ignore capture default by reference in cppcoreguidelines-avoid-capture-default-when-capturing-this

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. No comments from me, looks ok. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147062/new/ https://reviews.llvm.org/D147062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. - Fixed problem when af

[PATCH] D146875: [clang-tidy] Fix example provided by add_new_check.py

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I know that it would be better, best would be to remove that --fix-notes completely and enable those notes fixes with basic --fix, as it only create confusion. Originally it were like this: "Added an option to control whether to apply the fixes found in notes attached

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

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

[PATCH] D146887: [clang-tidy] Fix if-constexpr false-positive in readability-misleading-indentation

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 509136. PiotrZSL added a comment. Move tests to new file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146887/new/ https://reviews.llvm.org/D146887 Files: clang-tools-extra/clang-tidy/readability/Misleadin

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

2023-03-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 509141. PiotrZSL added a comment. Fix auto Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147081/new/ https://reviews.llvm.org/D147081 Files: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp

[PATCH] D146875: [clang-tidy] Fix example provided by add_new_check.py

2023-03-29 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ok, lets do that, I will change this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146875/new/ https://reviews.llvm.org/D146875 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D146887: [clang-tidy] Fix if-constexpr false-positive in readability-misleading-indentation

2023-03-29 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG498c88563b7f: [clang-tidy] Fix if-constexpr false-positive in readability-misleading… (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D144510: [clang-tidy] improve readability-identifier-naming hungarian options test

2023-02-24 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3f6a8d52d645: [clang-tidy] improve readability-identifier-naming hungarian options test (authored by amurzeau, committed by PiotrZSL). Repository:

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

2023-02-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL 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] D144748: [clang-tidy] Add bugprone-empty-catch check

2023-02-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 500274. PiotrZSL added a comment. Fix review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144748/new/ https://reviews.llvm.org/D144748 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModu

[PATCH] D144217: [clang-tidy] Fix false-positive in readability-container-size-empty

2023-02-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 500437. PiotrZSL marked 2 inline comments as done. PiotrZSL added a comment. Fix review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144217/new/ https://reviews.llvm.org/D144217 Files: clang-tools

[PATCH] D144217: [clang-tidy] Fix false-positive in readability-container-size-empty

2023-02-25 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe08cc52cfc23: [clang-tidy] Fix false-positive in readability-container-size-empty (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14421

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

2023-02-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 500523. PiotrZSL marked 2 inline comments as done. PiotrZSL added a comment. Review comments fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142587/new/ https://reviews.llvm.org/D142587 Files: clang-tools

[PATCH] D144594: [clang-tidy] Fix bugprone-copy-constructor-init documentation

2023-02-26 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe168964ce1fb: [clang-tidy] Fix bugprone-copy-constructor-init documentation (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144594/new/

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

2023-02-26 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc7dac52203a0: [clang-tidy] Improved too-small-loop-variable with bit-field support (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1425

[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-02-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In short, better support like this than lack of suport. Consider adding option for disabling those free standing functions, reason why I'm telling this is that in case of false-positives, it may be easier just to disable part of functionality than disabling entire check

[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-02-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:871 +return false; +} else if (Nodes.getNodeAs(EndCallName)) { + return true; ccotter wrote: > PiotrZSL wrote: > > ``else return Nodes.getNode

[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-02-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. consider adding testcase like this: for (auto I = Obj.begin(5), E = obj.end(5); I != E; ++I) { ... } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760

[PATCH] D144912: [clang-tidy] readability-identifier-naming: fix hungarian enum prefix in C

2023-02-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:181-187 +- Changed hungarian prefixes for enums in C files to match C++ files (ie. + always use the enum type letters, for example `rt` prefix for enum tags of + `enum REV_TYPE`) in :doc:`readab

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-02-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL updated this revision to Diff 500591. PiotrZSL added a comment. Eugene.Zelenko added reviewers: aaron.ballman, carlosgalvezp. Eugene.Zelenko a

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-02-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/HeaderIncludeCycleCheck.cpp:106-110 +if (History.size() == 2U) { + Check.diag(Loc, "direct self-inclusion of header file '%0'") + << History.back(); + return; +}

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-03-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 4 inline comments as done. PiotrZSL added a comment. "But maybe when we emit a warning for a specified include, we could put it in a set to not warn on that include again" I don't think so, in such case we hide include paths, and most of the time header guards should help here in

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-03-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 502464. PiotrZSL added a comment. Added support for --include Added support for self-include of source file Added more tests Reworked include stack. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ ht

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-03-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. TODO: Add option: ExcludeHeadersRegexp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-03-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. Option need to be added Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 ___ cfe-commits mai

[PATCH] D144036: [clang-tidy] Add bugprone-enum-to-bool-conversion check

2023-03-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. Documentation to be updated, option need to be changed to list Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144036/new/ https://reviews.llvm.org/D144036

[PATCH] D144135: [clang-tidy] Add performance-enum-size check

2023-03-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. Option need to be changed from Regex to List Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144135/new/ https://reviews.llvm.org/D144135 __

[PATCH] D144036: [clang-tidy] Add bugprone-enum-to-bool-conversion check

2023-03-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 502752. PiotrZSL added a comment. Ping, Rebase, Changed Option from Regexp to List, Improved documentation, Removed usage of deprecated API Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144036/new/ https://re

[PATCH] D144135: [clang-tidy] Add performance-enum-size check

2023-03-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 502790. PiotrZSL added a comment. Ping, Rebase, Changed Regexp option into List Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144135/new/ https://reviews.llvm.org/D144135 Files: clang-tools-extra/clang-tidy

[PATCH] D143971: [clang-tidy] Flag more buggy string constructor cases

2023-03-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.cpp:70-74 + const auto CharExpr = expr(anyOf( + ignoringParenImpCasts(characterLiteral()), + declRefExpr(hasDeclaration(varDecl(hasType(qualType(isAnyCharacter())

<    1   2   3   4   5   6   7   8   9   >