[PATCH] D157262: [clang-tidy] Add support for in-class initializers in readability-redundant-member-init

2023-08-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: carlosgalvezp, njames93. Herald added a subscriber: xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Support detecting red

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

2023-08-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 547704. PiotrZSL marked 10 inline comments as done. PiotrZSL edited the summary of this revision. PiotrZSL added a comment. rebase, add support for dependent context, update documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

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

2023-08-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: test/clang-tidy/readability-container-size-empty.cpp:135 + // CHECK-FIXES: {{^ }}if (str.empty()){{$}} + if (str.length() == 0) +; MyDeveloperDay wrote: > could you add a test that checks if StringRef.str().leng

[PATCH] D157285: [clang-tidy] Add support for lambdas in cppcoreguidelines-owning-memory

2023-08-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: carlosgalvezp, njames93, ccotter. Herald added subscribers: shchenz, kbarton, xazax.hun, nemanjai. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber:

[PATCH] D130209: [clang-tidy][NFC] Update tests to specify CheckOptions using new syntax

2023-08-07 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. Herald added subscribers: jplehr, carlosgalvezp. LGTM, minor conflicts only... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130209/new/ htt

[PATCH] D157246: [clang-tidy] Update tests to include C++23 and C++26

2023-08-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values-before-cxx23.cpp:2-6 +// RUN: -config="{CheckOptions: [\ +// RUN: {key: 'misc-const-correctness.TransformValues', value: true}, \ +// RUN: {key: 'misc-const

[PATCH] D157164: [clang-tidy] Add fix-it support to `llvmlibc-inline-function-decl`

2023-08-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Release notes are missing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157164/new/ https://reviews.llvm.org/D157164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D157326: [clang-tidy] Fix handling of out-of-line functions in readability-static-accessed-through-instance

2023-08-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp. Herald added a subscriber: xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Use isStatic instead

[PATCH] D157326: [clang-tidy] Fix handling of out-of-line functions in readability-static-accessed-through-instance

2023-08-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 548066. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Fix 'auto' Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157326/new/ https://reviews.llvm.org/D157326 Files: clang-tools-extra/c

[PATCH] D157367: [clang-tidy] Ignore delegate constructors in cppcoreguidelines-pro-type-member-init

2023-08-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: carlosgalvezp, njames93, ccotter. Herald added subscribers: shchenz, kbarton, xazax.hun, nemanjai. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber:

[PATCH] D157374: [clang-tidy] Ignore decltype in misc-redundant-expression

2023-08-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp. Herald added a subscriber: xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Modify check to ignor

[PATCH] D157376: [clang-tidy] Ignore unevaluated context in cppcoreguidelines-pro-type-vararg

2023-08-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: carlosgalvezp, njames93, ccotter. Herald added subscribers: shchenz, kbarton, xazax.hun, nemanjai. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber:

[PATCH] D157390: [clang-tidy][include-cleaner] Add option to control deduplication of findings per symbol

2023-08-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:195 +- Misc-include-cleaner check has option `DeduplicateFindings` to output one + finding per occurence of a symbol. invalid release note should be something like: ``` Improve

[PATCH] D157428: [clang-tidy] `readability-implicit-bool-conversion.AllowIntegerConditions` ignores `DoStmt`s

2023-08-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Missing release notes, except that looks fine. What about switchStmt ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157428/new/ https://reviews.llvm.org/D157428 ___ cfe-commits

[PATCH] D157436: [clang-tidy] `performance-faster-string-find` generates incorrect fixes for single quote character literals

2023-08-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp:40 + // "'" is OK, but ''' is not, so add a backslash + if (ClosePos - OpenPos == 2 && Result[OpenPos + 1] == '\'') +Result.replace(OpenPos + 1, 1, "\\'"); --

[PATCH] D157428: [clang-tidy] `readability-implicit-bool-conversion.AllowIntegerConditions` ignores `DoStmt`s

2023-08-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:199-202 +- Improved :doc:`readability-implicit-bool-conversion + ` check to take do-while loops into + account for the ``AllowIntegerConditions`` and ``AllowPointerConditions`` + options. -

[PATCH] D157428: [clang-tidy] `readability-implicit-bool-conversion.AllowIntegerConditions` ignores `DoStmt`s

2023-08-08 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/D157428/new/ https://reviews.llvm.org/D157428 ___

[PATCH] D157436: [clang-tidy] `performance-faster-string-find` generates incorrect fixes for single quote character literals

2023-08-08 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/D157436/new/ https://reviews.llvm.org/D157436 ___

[PATCH] D157188: [clang-tidy] Add bugprone-allocation-bool-conversion

2023-08-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 548554. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Rebase, add support for integer returnign functions, fixes in tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157188/new/ https

[PATCH] D158371: [clang-tidy] Fix DanglingHandleCheck to work in C++17 and later mode

2023-09-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D158371#4640664 , @loskutov wrote: > However, I don't have push access to the repo, so could you commit the change? Name / Email (to be used as author) ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D158928: [clang-tidy] Add IgnoreTypes option to modernize-use-nullptr

2023-09-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL closed this revision. PiotrZSL added a comment. Commited in 01c11569fc67b2a00403f64695fff6d2b4e78fe5 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158928/new/ https://reviews.llvm.org/D158928 __

[PATCH] D158371: [clang-tidy] Fix DanglingHandleCheck to work in C++17 and later mode

2023-09-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL closed this revision. PiotrZSL added a comment. Commited in f2e5000937235aa35a9ee4423045b265c2c79e85 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158371/new/ https://reviews.llvm.org/D158371 __

[PATCH] D154151: [clang-tidy] Improve documentation for modernize-use-std-print check

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8fdbc8712c5b: [clang-tidy] Improve documentation for modernize-use-std-print check (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

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

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153423/new/ https://reviews.llvm.org/D153423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D153298: [clang-tidy] Extend bugprone-exception-escape diagnostics

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153298/new/ https://reviews.llvm.org/D153298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D152713: [clang-tidy] Correct sizeof/alignas handling in misc-redundant-expression

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152713/new/ https://reviews.llvm.org/D152713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D151495: [clang-tidy] Improve build-in type handling in bugprone-swapped-arguments

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151495/new/ https://reviews.llvm.org/D151495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D149084: [clang-tidy] Added bugprone-multi-level-implicit-pointer-conversion check

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149084/new/ https://reviews.llvm.org/D149084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D149015: [clang-tidy] Added bugprone-inc-dec-in-conditions check

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149015/new/ https://reviews.llvm.org/D149015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148461/new/ https://reviews.llvm.org/D148461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147357/new/ https://reviews.llvm.org/D147357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

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

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

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

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144748/new/ https://reviews.llvm.org/D144748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D144429: [clang-tidy] Add bugprone-chained-comparison check

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144429/new/ https://reviews.llvm.org/D144429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

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

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144135/new/ https://reviews.llvm.org/D144135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D153458: [clang-tidy] Model noexcept more properly in bugprone-exception-escape

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153458/new/ https://reviews.llvm.org/D153458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D152713: [clang-tidy] Correct sizeof/alignas handling in misc-redundant-expression

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc1dc914a8ca2: [clang-tidy] Correct sizeof/alignas handling in misc-redundant-expression (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D154283: [clang-tidy] Fix width/precision argument order in modernize-use-std-print

2023-07-02 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Just few nits, from functionally point of view looks fine. Comment at: clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp:356-357 + if (ArgCount) +ArgRotates.push_back( +std::make_tuple(FS.getArgIndex() + ArgsOffset, ArgCount));

[PATCH] D154283: [clang-tidy] Fix width/precision argument order in modernize-use-std-print

2023-07-02 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/FormatStringConverter.h:73 + // puts the width and preicision first. + std::vector> ArgRotates; + mikecrowe wrote: > PiotrZSL wrote: > > NOTE: You can use std::pair here. > True, but

[PATCH] D154287: [clang-tidy] Add modernize-use-std-format check

2023-07-02 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. To be honest, I do not see to much use case for this check. But that's fine. Comment at: clang-tools-extra/clang-tidy/modernize/UseStdFormatCheck.cpp:46-51 + StatementMatcher StrFormatMatcher = + callExpr(callee(functionDecl(matchers::matchesAnyL

[PATCH] D154297: clang-tidy: accessing checks not done for aliases of `std::array`

2023-07-02 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, probably hasCanonicalType would be sufficient but hasUnqualifiedDesugaredType will also do a job. Release notes need to be updated. CHANGES SINCE LAST ACTION https://reviews

[PATCH] D154283: [clang-tidy] Fix width/precision argument order in modernize-use-std-print

2023-07-03 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/FormatStringConverter.h:73 + // puts the width and preicision first. + std::vector> ArgRotates; + mikecrowe wrote: > PiotrZSL wrote: > > mikecrowe wrote: > > > PiotrZSL wrote: > > >

[PATCH] D154283: [clang-tidy] Fix width/precision argument order in modernize-use-std-print

2023-07-03 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2806cf4b5430: [clang-tidy] Fix width/precision argument order in modernize-use-std-print (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D154297: clang-tidy: accessing checks not done for aliases of `std::array`

2023-07-03 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGce2d44b0ab6d: [clang-tidy] Accessing checks not done for aliases of `std::array` (authored by sousajo, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D154297?vs=536622&id=5368

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

2023-07-03 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D144347#4469770 , @ccotter wrote: > @PiotrZSL - checking back, do you plan to revisit this change soon (I think > there are some pending feedback and you planned some changes)? I'd like to > see this in change merged in. Let

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

2023-07-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked an inline comment as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/EnumSizeCheck.cpp:127-128 + + diag(MatchedDecl->getLocation(), "enum %0 derive from %1 of size %2 bytes, " + "derive

[PATCH] D154788: [clang-tidy] Don't split \r\n in modernize-use-std-print check

2023-07-09 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/D154788/new/ https://reviews.llvm.org/D154788 ___

[PATCH] D154287: [clang-tidy] Add modernize-use-std-format check

2023-07-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseStdFormatCheck.cpp:46 +void UseStdFormatCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher( + callExpr(argumentCountAtLeast(1), hasArgument(0, stringLiteral()), --

[PATCH] D154884: [clang-tidy] Make MatchesAnyListedNameMatcher cope with unnamed Decl

2023-07-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Remove example from commit message, it's already included in patch. Simply commit message should be properly formatted without unnecessary information. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:115 default: -return Regex

[PATCH] D154884: [clang-tidy] Make MatchesAnyListedNameMatcher cope with unnamed Decl

2023-07-11 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/D154884/new/ https://reviews.llvm.org/D154884 ___

[PATCH] D154999: [clang-tidy] Add bugprone-std-forward-type-mismatch check

2023-07-11 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 instances where

[PATCH] D154788: [clang-tidy] Don't split \r\n in modernize-use-std-print check

2023-07-11 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2ce765eb2f4f: [clang-tidy] Don't split \r\n in modernize-use-std-print check (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D154884: [clang-tidy] Make MatchesAnyListedNameMatcher cope with unnamed Decl

2023-07-11 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb389a62518ad: [clang-tidy] Make MatchesAnyListedNameMatcher cope with unnamed Decl (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-12 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. Missing documentation for check. Once you ready with update, please switch review into ready for review. Comment at: clang-tools-extra/clang-tidy/misc/Incomplet

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SwitchMissingDefaultCaseCheck.cpp:16-29 +void SwitchMissingDefaultCaseCheck::registerMatchers( +ast_matchers::MatchFinder *Finder) { + Finder->addMatcher( + switchStmt(has(implicitCastExp

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/switch-missing-default-case.cpp:27 + } +} Add also tests with int/enum behind typedef and no default case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-13 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/switch-missing-default-case.rst:52 +.. note:: + Enum types are already covered by compiler warnings when a switch statement + does not handle all enum values. This check focuses on

[PATCH] D155217: [clang-tidy][include-cleaner] Don't warn for the same symbol twice

2023-07-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Check emits warnings per symbol/usage, but fixes header includes, won't it make duplicate includes ? Problem that I see is that multiple warnings for same symbol will generate lot of noise. And when dealing with diff why developer should be forced to fix legacy issues

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SwitchMissingDefaultCaseCheck.cpp:16-29 +void SwitchMissingDefaultCaseCheck::registerMatchers( +ast_matchers::MatchFinder *Finder) { + Finder->addMatcher( + switchStmt(has(implicitCastExp

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SwitchMissingDefaultCaseCheck.cpp:19 + Finder->addMatcher( + switchStmt(has(implicitCastExpr().bind("cast")), + unless(hasAncestor(switchStmt(has(defaultStmt()) --

[PATCH] D151495: [clang-tidy] Improve build-in type handling in bugprone-swapped-arguments

2023-07-16 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcc4f86562127: [clang-tidy] Improve build-in type handling in bugprone-swapped-arguments (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D151495?vs=525786&id=540822#toc Reposit

[PATCH] D153458: [clang-tidy] Model noexcept more properly in bugprone-exception-escape

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

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Tests need to be reverted, and template handling corrected (check comments). After that it looks good to me. Comment at: clang-tools-extra/clang-tidy/bugprone/SwitchMissingDefaultCaseCheck.cpp:29 + Finder->addMatcher( + switchStmt(hasCondition(e

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-16 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. Just few nits (column numbers in test, missing doxygen comment, ...). Please fix those before committing. Except that, looking good to me. Comment at: clang-tools-extra

[PATCH] D153458: [clang-tidy] Model noexcept more properly in bugprone-exception-escape

2023-07-17 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG27245077643a: [clang-tidy] Model noexcept more properly in bugprone-exception-escape (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D15

[PATCH] D158657: [clang-tidy] Fix false-positives in misc-static-assert caused by non-constexpr variables

2023-08-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: alexfh, njames93, carlosgalvezp. Herald added a subscriber: xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Ignore false-

[PATCH] D157283: [clang] Match -isysroot behaviour with system compiler on Darwin

2023-08-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I don't know how, but somehow this change breaks clang-tidy/infrastructure/clang-tidy-mac-libcxx.cpp test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157283/new/ https://reviews.llvm.org/D157283 __

[PATCH] D158665: [clang-tidy] Improve cppcoreguidelines-avoid-reference-coroutine-parameters check

2023-08-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: carlosgalvezp, njames93, ccotter. Herald added subscribers: ChuanqiXu, shchenz, kbarton, xazax.hun, nemanjai. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a

[PATCH] D158665: [clang-tidy] Improve cppcoreguidelines-avoid-reference-coroutine-parameters check

2023-08-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidReferenceCoroutineParametersCheck.cpp:20 + Finder->addMatcher( + functionDecl(unless(parameterCountIs(0)), hasBody(coroutineBodyStmt())) + .bind("fnt"), ---

[PATCH] D158665: [clang-tidy] Improve cppcoreguidelines-avoid-reference-coroutine-parameters check

2023-08-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked an inline comment as done. PiotrZSL added a comment. I'm pushing this in current state, if you want to change something after that, fell free to do it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158665/new/ https://reviews.llvm.

[PATCH] D158665: [clang-tidy] Improve cppcoreguidelines-avoid-reference-coroutine-parameters check

2023-08-24 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0e2c5cda3cc7: [clang-tidy] Improve cppcoreguidelines-avoid-reference-coroutine-parameters… (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D158787: llvm-project/issues/42451

2023-08-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. - Missing documentation entry about this style. - Missing release notes entry - Commit title / description should be more in line with style used in project Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158787/new/ https:/

[PATCH] D158691: [clang-tidy] Container-size-empty fixed c++ version in tests to support string_literals operator

2023-08-25 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/D158691/new/ https://reviews.llvm.org/D158691 ___

[PATCH] D158787: [clang-tidy][readability] add Leading_upper_snake_case

2023-08-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:116-118 +- Improved :doc:`readability-identifier-naming + ` check to allow for + Leading_upper_snake_case naming convention. Wrong section, add it under "Changes in existing che

[PATCH] D158787: [clang-tidy][readability] add Leading_upper_snake_case

2023-08-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. And add reference to issue in commit description. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158787/new/ https://reviews.llvm.org/D158787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D156624: [clang-tidy] Access checks not done classes derived of std::array

2023-08-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156624/new/ https://reviews.llvm.org/D156624 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D158787: [clang-tidy][readability] add Leading_upper_snake_case issue 42451

2023-08-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Upload full path to avoid "Context not available." Comment at: clang-tools-extra/docs/ReleaseNotes.rst:256 +- Improved :doc:`readability-identifier-naming + ` Leading_upper_snake_case -> put this entry in alphabetical order =

[PATCH] D156624: [clang-tidy] Access checks not done classes derived of std::array

2023-08-25 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG41818ce150fd: [clang-tidy] Access checks not done classes derived of std::array (authored by sousajo, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D158787: [clang-tidy][readability] add Leading_upper_snake_case

2023-08-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:240-245 ` check to emit proper warnings when a type forward declaration precedes its definition. +- Improved :doc:`readability-identifier-naming + ` allow for + ``Leading_upper_snake_cas

[PATCH] D158787: [clang-tidy][readability] add Leading_upper_snake_case

2023-08-25 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. After you update release notes entry, it could land... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158787/new/ https://reviews.llvm.org/D158787

[PATCH] D158872: [clang][ASTMatchers] Add a few type-related Matchers

2023-08-25 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. Nothing fancy, looks straight forward. You may want to wait for an Aaron Ballman opinion. Comment at: clang/docs/LibASTMatchersReference.html:2454 +Matcher

[PATCH] D158691: [clang-tidy] Container-size-empty fixed c++ version in tests to support string_literals operator

2023-08-26 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGffad4f8fcac5: [clang-tidy] Container-size-empty fixed c++ version in tests to support… (authored by felix642, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D158371: [clang-tidy] Fix DanglingHandleCheck to work in C++17 and later mode

2023-08-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. Overall looks to be fine, but I didn't get too deep into AST matchers. I assume that tests cover them. Please wait like 2 weeks before pushing this, so someone else could be able to verify

[PATCH] D158928: [clang-tidy] Add IgnoreTypes option to modernize-use-nullptr

2023-08-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: carlosgalvezp, njames93. Herald added a subscriber: xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added subscribers: cfe-commits, wangpc. Herald added a project: clang-tools-extra. New option add

[PATCH] D158929: [clang-tidy] Add exit code support to clang-tidy-diff.py

2023-08-26 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp. Herald added a subscriber: xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Modify script to fail

[PATCH] D158959: [clang-tidy] Disambiguate calls to log

2023-08-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Thank you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158959/new/ https://reviews.llvm.org/D158959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D158787: [clang-tidy][readability] add Leading_upper_snake_case

2023-08-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D158787#4621587 , @MasterCopy8GB wrote: > Hello @PiotrZSL, I do not have rights to commit to the LLVM repository. Could > you please commit these changes for me? Thank you for all of your time and > effort! Under which use

[PATCH] D156616: [clang-tidy] Fix c_str() removal and cast addition when re-ordering arguments

2023-08-28 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. In D156616#4621914 , @mikecrowe wrote: > @PiotrZSL, I think that this is quite an important fix since without it the > check completely mangles th

[PATCH] D156616: [clang-tidy] Fix c_str() removal and cast addition when re-ordering arguments

2023-08-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D156616#4621975 , @mikecrowe wrote: > The removal of `c_str()` happens even without StrictMode set to True. I still think we will be fine. There are not many situations when arguments need to be reorder. And most probably no

[PATCH] D156616: [clang-tidy] Fix c_str() removal and cast addition when re-ordering arguments

2023-08-28 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc6207f6e0d04: [clang-tidy] Fix c_str() removal and cast addition when re-ordering arguments (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D158787: [clang-tidy][readability] add Leading_upper_snake_case

2023-08-28 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf0e2a5e260c2: [clang-tidy][readability] add Leading_upper_snake_case (authored by MasterCopy8GB, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D158787?vs=553593&id=554022#toc

[PATCH] D158929: [clang-tidy] Add exit code support to clang-tidy-diff.py

2023-08-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 554028. PiotrZSL marked 2 inline comments as done. PiotrZSL added a comment. Fix some Pylint issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158929/new/ https://reviews.llvm.org/D158929 Files: clang-t

[PATCH] D159045: [clang-tidy] Improved documentation for readability-function-size

2023-08-28 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. Change is ok. Interesting thing is that we got more of such issues in many checks. I'm thinking, maybe support for optional fields is needed, fields that can accept integer or false/no val

[PATCH] D158872: [clang][ASTMatchers] Add a few type-related Matchers

2023-08-29 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. From a mine perspective when it comes to clang-tidy: - I personally do not care about Objective-C specific matchers - I do not plan to use them. - I personally avoid using "Type" based matchers if I can (due to mess with elaborated/wrapped types), it's easier to create

[PATCH] D159045: [clang-tidy] Improved documentation for readability-function-size

2023-08-31 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D159045#4631650 , @felix642 wrote: > We can already disable those options if we don't define them in the config. > Adding the possibility to provide optional values seems redundant to me. Do > you see any reason why we would

[PATCH] D159045: [clang-tidy] Improved documentation for readability-function-size

2023-08-31 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D159045#4631820 , @felix642 wrote: > In that case, I agree with you, it would be helpful to add this feature. I > think supporting an empty value rather than a boolean is preferable. We > should maybe do that in another Diff

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

2023-08-31 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGefebb4e0fabe: [clang-tidy] readability-container-size-empty handle std::string length() (authored by PiotrZSL). Changed p

[PATCH] D158929: [clang-tidy] Add exit code support to clang-tidy-diff.py

2023-08-31 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4294bca5e4f6: [clang-tidy] Add exit code support to clang-tidy-diff.py (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158929/new/ htt

[PATCH] D158486: [clang-tidy] Ignore used special-members in modernize-use-equals-delete

2023-09-03 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG208fa9acc0ff: [clang-tidy] Ignore used special-members in modernize-use-equals-delete (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D158486?vs=552217&id=555635#toc Repositor

[PATCH] D159436: [clang-tidy] Add support for optional parameters in config.

2023-09-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:196-198 +if (Value == "" || Value == "none" || Value == "null" || + Value == "false" || (std::is_unsigned_v && Value == "-1")) + return std::nullopt; --

<    1   2   3   4   5   6   7   8   9   >