[PATCH] D157057: [clang-tidy] Implement cppcoreguidelines CP.52

2023-08-11 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa563ced78bb4: [clang-tidy] Implement cppcoreguidelines CP.52 (authored by ccotter, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1570

[PATCH] D157702: [clang][analyzer][NFC] Change PlacementNewChecker into PlacementNew in documentation

2023-08-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: manas, steakhal, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang. Herald

[PATCH] D157702: [clang][analyzer][NFC] Change PlacementNewChecker into PlacementNew in documentation

2023-08-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 549336. PiotrZSL added a comment. Micro fix ("" characters). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157702/new/ https://reviews.llvm.org/D157702 Files: clang/docs/analyzer/checkers.rst Index: clang

[PATCH] D157702: [clang][analyzer][NFC] Change PlacementNewChecker into PlacementNew in documentation

2023-08-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D157702#4580310 , @steakhal wrote: > Do we have other typos like this? I don't think so, only mess in overall documentation: https://github.com/llvm/llvm-project/issues/64614 I updated gen-static-analyzer-docs.py, and it sho

[PATCH] D157649: [clang-tidy] Fix crash when diagnostic is emit with invalid location

2023-08-11 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGefd44f80a5a8: [clang-tidy] Fix crash when diagnostic is emit with invalid location (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1576

[PATCH] D157702: [clang][analyzer][NFC] Change PlacementNewChecker into PlacementNew in documentation

2023-08-11 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa3a66de37fc0: [clang][analyzer][NFC] Change PlacementNewChecker into PlacementNew in… (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D157773: [clang-tidy] fix None tmpdir when exporting fixes in run-clang-tidy

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

[PATCH] D157773: [clang-tidy] fix None tmpdir when exporting fixes in run-clang-tidy

2023-08-12 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc3da99275a52: [clang-tidy] fix None tmpdir when exporting fixes in run-clang-tidy (authored by 5chmidti, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D157829: [clang-tidy] Added a new option to lambda-function-name to ignore warnings in macro expansion

2023-08-14 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 storeOptions metod, everyting else looks +- fine. Comment at: clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp:81 Result.Sourc

[PATCH] D157239: [clang-tidy] Implement bugprone-incorrect-enable-if

2023-08-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. LGTM (+-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157239/new/ https://reviews.llvm.org/D157239 __

[PATCH] D157869: [clang-tidy] Avoid overflow when dumping unsigned integer values

2023-08-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. This wont fix issue, simply because problem happen during reading -1, not during dumping, and per documentation -1 was a valid value. Same issue happen in other checks that use -1. Most probably best way would be to change those variables into std::int64_t, in C++ crea

[PATCH] D157869: [clang-tidy] Avoid overflow when dumping unsigned integer values

2023-08-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I agree that this change is an improvement that is welcome, but that's not a fix for a #60217. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157869/new/ https://reviews.llvm.org/D157869 __

[PATCH] D157829: [clang-tidy] Added a new option to lambda-function-name to ignore warnings in macro expansion

2023-08-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. LGTM Comment at: clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp:91-93 +if (IgnoreMacros) { + return; +} Repository:

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

2023-08-14 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0c7d28f72e19: [clang-tidy] Ignore decltype in misc-redundant-expression (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D157374?vs=548104&id=550201#toc Repository: rG LLVM G

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

2023-08-14 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG766dd7b80b57: [clang-tidy] Fix handling of out-of-line functions in readability-static… (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D157326?vs=548066&id=550200#toc Reposit

[PATCH] D157829: [clang-tidy] Added a new option to lambda-function-name to ignore warnings in macro expansion

2023-08-16 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa94c44cc0a56: [clang-tidy] Added a new option to lambda-function-name to ignore warnings in… (authored by felix642, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D158157: [clang-tidy] Disable implicit search for a compilation db in some tests

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

[PATCH] D158244: [clang-tidy]`pro-bounds-array-to-pointer-decay` ignore predefined expression

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

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

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 551757. PiotrZSL added a comment. Rebase + Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56644/new/ https://reviews.llvm.org/D56644 Files: clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyChe

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

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 551758. PiotrZSL added a comment. Rebase + Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144429/new/ https://reviews.llvm.org/D144429 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

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

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 551760. PiotrZSL added a comment. Rebase + Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148461/new/ https://reviews.llvm.org/D148461 Files: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp c

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

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 551761. PiotrZSL added a comment. Rebase + Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153298/new/ https://reviews.llvm.org/D153298 Files: clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.c

[PATCH] D158152: [clang-tidy]mark record initList as non-const param

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:230 +- Improved :doc:`readability-non-const-parameter.cpp + ` check to ignore Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D15

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

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 2 inline comments as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:306 + + if (From->isMemberPointerType() || To->isMemberPointerType()) return false; isuckatcs wrote: > is

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

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 551776. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Add throw_basefn_catch_const_basefn test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148461/new/ https://reviews.llvm.org/D148461

[PATCH] D158338: [clang-tidy] [bugprone-implicit-widening-of-multiplication-result] Improved check to ignore false positives with integer literals.

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I'm not sure if this is right fix, example: const std::size_t k1Tb = 1024 * 1024 * 1024 * 1024; This is detected by -Winteger-overflow, but this: const std::size_t k1Pb = 1024U * 1024U * 1024U * 1024U * 1024U; is not detect by anything except this check, even th

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

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL marked 4 inline comments as done. PiotrZSL added a comment. TODO: Resolve rest of review comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:14 void ExceptionAnalyzer::ExceptionInfo::registerExcepti

[PATCH] D158338: [clang-tidy] [bugprone-implicit-widening-of-multiplication-result] Improved check to ignore false positives with integer literals.

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In short I'm against simply ignoring literal calculations because this check is only thing that currently detect this issue: https://github.com/llvm/llvm-project/issues/64828 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

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

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL abandoned this revision. PiotrZSL added a comment. I do not plan to work on this check anymore, sorry for a wasted time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148461/new/ https://reviews.llvm.org/D148461 __

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

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL abandoned this revision. PiotrZSL marked 4 inline comments as done. PiotrZSL added a comment. I do not plan to work on this check anymore, sorry for a wasted time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153298/new/ https://reviews.l

[PATCH] D158346: [clang-tidy] [readability-container-size-empty] improved check to detect missing usage of .empty() on string_literals Fixes #64547

2023-08-19 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. - Release notes entry is missing. - Commit/Change description should be updated Comment at: clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cp

[PATCH] D158338: [clang-tidy] [bugprone-implicit-widening-of-multiplication-result] Improved check to ignore false positives with integer literals.

2023-08-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Yes doing some basic calculations would be probably the best, but for that we would need to implement some "calculator" or find some exist implementation some're in clang. Even if it would support only basic operations like * Repository: rG LLVM Github Monorepo CHA

[PATCH] D158346: [clang-tidy] [readability-container-size-empty] improved check to detect missing usage of .empty() on string_literals Fixes #64547

2023-08-19 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, run clang-format on this code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158346/new/ https://reviews.llvm.org/D158346

[PATCH] D158152: [clang-tidy]mark record initList as non-const param

2023-08-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. LGTM, but note that type aliases may not work properly, but that more a legacy issue that got source in line 104, simply because we should use canonical type there. Com

[PATCH] D128861: [clang-tidy] add cppcoreguidelines-symmetric-binary-operator

2023-08-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. For me check is fine and bring some value. But for me auto-fixes in this check aren't needed, this simply complicate a check that could be very simple. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128861/new/ https://rev

[PATCH] D157239: [clang-tidy] Implement bugprone-incorrect-enable-if

2023-08-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I'm pushing this, if you want to change anything else, just please open new review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157239/new/ https://reviews.llvm.org/D157239 _

[PATCH] D157239: [clang-tidy] Implement bugprone-incorrect-enable-if

2023-08-21 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa7bdaff7cad9: [clang-tidy] Implement bugprone-incorrect-enable-if (authored by ccotter, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D157239?vs=549777&id=552077#toc Reposit

[PATCH] D158346: [clang-tidy] readability-container-size-empty - detect missing usage of .empty() on string_literals

2023-08-21 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4001ae175cbe: [clang-tidy] readability-container-size-empty - detect missing usage of .empty… (authored by felix642, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D158346?vs=

[PATCH] D128861: [clang-tidy] add cppcoreguidelines-symmetric-binary-operator

2023-08-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SymmetricBinaryOperatorCheck.cpp:29 + +bool isPotentialSymmetricBinaryOperator(OverloadedOperatorKind Kind) { + return llvm::is_contained( again, I would probably try to

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

2023-08-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: malcolm.parsons, 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. Spec

[PATCH] D158480: [clang-tidy][readability-braces-around-statements] ignore false-positive for constexpr if statement in lambda expression

2023-08-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. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158480/new/ https://reviews.llvm.org/D158480 ___

[PATCH] D158534: [clang-tidy] Disable trivially-destructible check for darwin

2023-08-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. 626849c71e85d546a004cc91866beab610222194 didn't fix this issue already ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158534/new/ https://reviews.llv

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

2023-10-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL closed this revision. PiotrZSL added a comment. Obsolete. No longer needed after D159436 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159045/new/ https://reviews.llvm.org/D159045 ___

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

2023-10-09 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7a73da4c85a1: [clang-tidy] Add support for optional parameters in config. (authored by felix642, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D159436?vs=557546&id=557652#toc

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

2023-07-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/inc-dec-in-conditions.rst:62 +means that if ``i`` were initially ``5``, the first operand ``i < 5`` would +evaluate to ``false`` and the second operand ``i > 2`` would not be evaluated.

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

2023-07-29 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG87d0aedaa285: [clang-tidy] Add readability-reference-to-constructed-temporary check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146

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

2023-07-29 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 545371. PiotrZSL marked 4 inline comments as done. PiotrZSL edited the summary of this revision. PiotrZSL added a comment. Rebase + Fix review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149015/new/

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

2023-07-29 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 545372. PiotrZSL added a comment. Rebase + Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147357/new/ https://reviews.llvm.org/D147357 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[PATCH] D141892: [clang-tidy] Implement modernize-use-constraints

2023-07-29 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize/use-constraints.rst:4 +modernize-use-constraints +== + Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D141892: [clang-tidy] Implement modernize-use-constraints

2023-07-29 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 this check is complicated, simply because it's doing complicated stuff. 1. Add description to all functions (what is their purpose, what is expected outcome, maybe put some "exampl

[PATCH] D156608: [clang-tidy] Do not warn on macros starting with underscore and lowercase letter in bugprone-reserved-identifier

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

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

2023-07-30 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf27f22b34516: [clang-tidy] Added bugprone-inc-dec-in-conditions check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149015/new/ http

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

2023-07-30 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/OptionalValueConversionCheck.cpp:61 + matchers::matchesAnyListedName(ValueMethods) + .bind("fun")), + hasType(qualType().bind("value-type")));

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

2023-07-30 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Good, just verify that documentation for this check is still proper, and add entry in release notes about this change. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156624/new/ https://reviews.llvm.org/D156624 ___ c

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

2023-07-30 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156624/new/ https://reviews.llvm.org/D156624 ___ cfe-commits mailing list cfe-commi

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

2023-07-30 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 545464. PiotrZSL added a comment. Review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147357/new/ https://reviews.llvm.org/D147357 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.c

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

2023-07-30 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D156624#4545170 , @sousajo wrote: > Good point, I cannot think of an _easy_ way to check it. I think you can do something like this: Finder->addMatcher( cxxOperatorCallExpr( hasOverloadedOperatorName("[]"),

[PATCH] D141892: [clang-tidy] Implement modernize-use-constraints

2023-07-30 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp:42 +void UseConstraintsCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher( + functionTemplateDecl( W

[PATCH] D141892: [clang-tidy] Implement modernize-use-constraints

2023-07-30 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG893d53d11c01: [clang-tidy] Implement modernize-use-constraints (authored by ccotter, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14

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

2023-07-30 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG575900d0d98a: [clang-tidy] Add bugprone-optional-value-conversion check (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D147357?vs=545464&id=545510#toc Repository: rG LLVM G

[PATCH] D156286: [docs] Bump minimum GCC version to 7.4

2023-07-31 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: llvm/docs/GettingStarted.rst:345 * Apple Clang 10.0 -* GCC 7.1 +* GCC 7.4 * Visual Studio 2019 16.7 What about Glibc version ? I were using GCC 9.1 + glibc 2.13 + some old kernel to compile Clang 15, after upgrading

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

2023-08-04 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, things that are missing: - some crash protection (getName) - test for rbegin/rend Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:333 +en

[PATCH] D157057: [clang-tidy] Implement cppcoreguidelines CP.52

2023-08-04 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/NoSuspendWithLockCheck.cpp:24-26 + hasType(recordDecl(hasAnyName( + "::std::unique_lock", "::std::lock_guard", +

[PATCH] D157057: [clang-tidy] Implement cppcoreguidelines CP.52

2023-08-04 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Consider ignoring template instances, to avoid generating lot of warnings for each instance. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157057/new/ https://reviews.llvm.org/D157057

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

2023-08-04 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Test are failing, and I do not think that converting c-strings into std::array is a good idea Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145138/new/ https://reviews.llvm.org/D145138 ___

[PATCH] D157178: [clang-tidy] Fix inline namespaces in llvm-namespace-comment

2023-08-04 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. Provide fixes for inl

[PATCH] D157180: [clang-tidy] Exclude class/struct scope variables from cppcoreguidelines-avoid-non-const-global-variables

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp, 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] D157181: [clang-tidy] Re-add cppcoreguidelines-macro-to-enum alias

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp. Herald added subscribers: jeroen.dobbelaere, 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] D157182: [clang-tidy][NFC] Update documentation for hicpp-avoid-goto

2023-08-05 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. Add info in check lis

[PATCH] D157185: [clang-tidy] Fix false-positives in performanc-noexcept-swap

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp, AMS21. 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. Enforce a stri

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

2023-08-05 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. Detects cases where t

[PATCH] D157190: [clang-tidy] Fixed false-negative in readability-identifier-naming

2023-08-05 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. Issue were cased by c

[PATCH] D157190: [clang-tidy] Fixed false-negative in readability-identifier-naming

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 547475. PiotrZSL edited the summary of this revision. PiotrZSL added a comment. Properly handle situation when class is forward-declared as struct. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157190/new/ htt

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

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D157188#4563105 , @Eugene.Zelenko wrote: > Shouldn't C-style allocation be checked too? Same for custom allocators via > configuration option. In theory it could, but in such case name of check would need to change... Rep

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

2023-08-05 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/D140760/new/ https://reviews.llvm.org/D140760 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D157190: [clang-tidy] Fixed false-negative in readability-identifier-naming

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming.cpp:716 +// CHECK-FIXES: {{^}}class CClassWithForwardDecl { +class class_with_forward_decl { + int __value; carlosgalvezp wrote: > Nit: shouldn'

[PATCH] D157181: [clang-tidy] Re-add cppcoreguidelines-macro-to-enum alias

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D157181#4563147 , @carlosgalvezp wrote: > Strange, it seems the alias was never fully added? > https://reviews.llvm.org/D117522 Looks like, still I dont know what to do with release notes, add alias "again" there, dont chan

[PATCH] D157178: [clang-tidy] Fix inline namespaces in llvm-namespace-comment

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG166372e0bd2d: [clang-tidy] Fix inline namespaces in llvm-namespace-comment (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157178/new/

[PATCH] D157182: [clang-tidy][NFC] Update documentation for hicpp-avoid-goto

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGee2b765cdd5b: [clang-tidy][NFC] Update documentation for hicpp-avoid-goto (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157182/new/

[PATCH] D157180: [clang-tidy] Exclude class/struct scope variables from cppcoreguidelines-avoid-non-const-global-variables

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3e2ed5701b7e: [clang-tidy] Exclude class/struct scope variables from cppcoreguidelines-avoid… (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D157180?vs=547457&id=547499#toc R

[PATCH] D157185: [clang-tidy] Fix false-positives in performanc-noexcept-swap

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 547502. PiotrZSL added a comment. Rebase, add comments, make more strict for method (must be non-const) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157185/new/ https://reviews.llvm.org/D157185 Files: clan

[PATCH] D157190: [clang-tidy] Fixed false-negative in readability-identifier-naming

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 547503. PiotrZSL added a comment. Rebase + make tests more simple Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157190/new/ https://reviews.llvm.org/D157190 Files: clang-tools-extra/clang-tidy/readability/I

[PATCH] D157181: [clang-tidy] Re-add cppcoreguidelines-macro-to-enum alias

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 547504. PiotrZSL added a comment. Add release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157181/new/ https://reviews.llvm.org/D157181 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGu

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

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6a1f8ef8a7aa: [clang-tidy] Support begin/end free functions in modernize-loop-convert (authored by ccotter, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D140760?vs=547483&id

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

2023-08-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 547523. PiotrZSL retitled this revision from "[clang-tidy] Add bugprone-new-bool-conversion" to "[clang-tidy] Add bugprone-allocation-bool-conversion". PiotrZSL edited the summary of this revision. PiotrZSL added a comment. Change check anme, add configurat

[PATCH] D157185: [clang-tidy] Fix false-positives in performanc-noexcept-swap

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 547526. PiotrZSL marked 3 inline comments as done. PiotrZSL added a comment. Fix comments + add test with friend Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157185/new/ https://reviews.llvm.org/D157185 File

[PATCH] D157181: [clang-tidy] Re-add cppcoreguidelines-macro-to-enum alias

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb3700c34aa71: [clang-tidy] Re-add cppcoreguidelines-macro-to-enum alias (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157181/new/ ht

[PATCH] D157185: [clang-tidy] Fix false-positives in performanc-noexcept-swap

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 547528. PiotrZSL added a comment. Remove space Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157185/new/ https://reviews.llvm.org/D157185 Files: clang-tools-extra/clang-tidy/performance/NoexceptSwapCheck.cp

[PATCH] D157190: [clang-tidy] Fixed false-negative in readability-identifier-naming

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2111577d4dfc: [clang-tidy] Fixed false-negative in readability-identifier-naming (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D157190?vs=547503&id=547536#toc Repository:

[PATCH] D157185: [clang-tidy] Fix false-positives in performanc-noexcept-swap

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2553e2403a33: [clang-tidy] Fix false-positives in performanc-noexcept-swap (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D157185?vs=547528&id=547537#toc Repository: rG LLV

[PATCH] D157057: [clang-tidy] Implement cppcoreguidelines CP.52

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/NoSuspendWithLockCheck.cpp:27 + namesType(templateSpecializationType(hasDeclaration(namedDecl( + hasAnyName(utils::options::parseStringList(LockGuards))); + -

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

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 547587. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Formating + fix tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157188/new/ https://reviews.llvm.org/D157188 Files: clang-too

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

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/AllocationBoolConversionCheck.cpp:25 + "malloc;calloc;realloc;strdup;fopen;fdopen;freopen;" + "opendir;fdopendir;popen;mmap;allocate"))) {} + -

[PATCH] D157237: [clang][ASTMatcher] Add Matcher 'dependentSizedExtVectorType'

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Matcher registration is missing, verify if it's visible in clang-query. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157237/new/ https://reviews.llvm.org/D157237 ___ cfe-commit

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

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. TODO: Fix CI, Add support for allocators that return 'integer', hardcode most of functions, change config into AdditionalAllocationFunctions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D157239: [clang-tidy] Implement bugprone-incorrect-enable-if

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/IncorrectEnableIfCheck.cpp:57 + + const SourceManager &SM = Result.Context->getSourceManager(); + SourceLocation RAngleLoc = Result got source manager https://clang.llvm.org/d

[PATCH] D157057: [clang-tidy] Implement cppcoreguidelines CP.52

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

[PATCH] D157242: [clang-tidy] Exclude delegate constructors in cppcoreguidelines-prefer-member-initializer

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp, 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] D157246: [clang-tidy] Update tests to include C++23 and C++26

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

[PATCH] D157242: [clang-tidy] Exclude delegate constructors in cppcoreguidelines-prefer-member-initializer

2023-08-06 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7a4b12e39b84: [clang-tidy] Exclude delegate constructors in cppcoreguidelines-prefer-member… (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D157242?vs=547607&id=547649#toc Re

<    1   2   3   4   5   6   7   8   9   >