[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-03-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D141569#4163607 , @ccotter wrote: > bump. I never heard back on the case where using an rvalue reference for a > big pod type as opposed to const ref. I have such use cases in project, they not necessary POD, but more like a

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-03-06 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I was thinking... In theory fix for this check should be one of: use const &, use value, move rvalue. But const & is not always in an option, in utils we got 2 functions: isOnlyUsedAsConst, isExpensiveToCopy. So in theory if variable can be used as const, then const & c

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

2023-03-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.cpp:97 + const auto CharToIntCastExpr = implicitCastExpr( + hasSourceExpression(expr(hasType(qualType(isAnyCharacter(), + hasImplicitDestinationType(NonCharacte

[PATCH] D144206: [clang-tidy] Fix false-positive in cppcoreguidelines-slicing

2023-03-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503082. PiotrZSL added a comment. Ping, Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144206/new/ https://reviews.llvm.org/D144206 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.c

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

2023-03-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503092. PiotrZSL added a comment. Ping, Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144347/new/ https://reviews.llvm.org/D144347 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt cla

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

2023-03-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503122. PiotrZSL added a comment. Ready for review, added new check option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/mis

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

2023-03-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503144. PiotrZSL added a comment. Rebase due to failed clangd tests on windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/

[PATCH] D143496: [clangd] Add support for missing includes analysis.

2023-03-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. This change broke regression, non-one read: "This revision was landed with ongoing or failed builds." ./ClangdTests.exe/IncludeCleaner/GenerateMissingHeaderDiags tests fails on windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

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

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503251. PiotrZSL added a comment. Rebase due to broken baseline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/misc/CMakeLists

[PATCH] D144206: [clang-tidy] Fix false-positive in cppcoreguidelines-slicing

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503287. PiotrZSL added a comment. Rebase due to broken baseline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144206/new/ https://reviews.llvm.org/D144206 Files: clang-tools-extra/clang-tidy/cppcoreguidelin

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

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503297. PiotrZSL added a comment. Rebase due to broken baseline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144347/new/ https://reviews.llvm.org/D144347 Files: clang-tools-extra/clang-tidy/readability/CMa

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

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503312. PiotrZSL added a comment. Ping, Rebase 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] D143496: [clangd] Add support for missing includes analysis.

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. @VitaNuo Why did you recommit this again without any fix, breaking regression again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143496/new/ https://reviews.llvm.org/D143496

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

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503357. PiotrZSL added a comment. Rebase due to broken baseline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144347/new/ https://reviews.llvm.org/D144347 Files: clang-tools-extra/clang-tidy/readability/CMa

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

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503362. PiotrZSL added a comment. Rebase due to broken baseline 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/Bugpro

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

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503364. PiotrZSL added a comment. Ping, Rebase 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/readability/CMakeLists.txt cla

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

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503365. PiotrZSL added a comment. Ping, Rebase 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/BugproneTidyModule.cpp

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

2023-03-08 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:1296 +// In a function call, the expression that determines the callee is sequenced +// before the arguments. This entire file tests only C++17 a

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

2023-03-08 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. Check flags always enab

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

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503529. PiotrZSL added a comment. Micro fixes in 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/Avo

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

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503616. PiotrZSL edited the summary of this revision. PiotrZSL added a comment. Review comments fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145617/new/ https://reviews.llvm.org/D145617 Files: clan

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

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. There are 186 findings from this check in llvm repository, no false-positives. Example: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:2071:2: warning: preprocessor condition is always 'true', consider removing condition but leaving its contents [readability-av

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

2023-03-08 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. Add more tests (those missing one), to make sure that this wont break proper cases. Refer to inline comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D122677: [prototype] include-cleaner library

2023-03-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp:62 "misc-unused-alias-decls"); +CheckFactories.registerCheck("misc-unused-includes"); CheckFactories.registerCheck( Missing tests & documentation fo

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

2023-03-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, ChuanqiXu, shchenz, kbarton, xazax.hun, nemanjai. 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 subscribe

[PATCH] D137514: [clang-tidy] add check for capturing lambda coroutines

2023-03-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503888. PiotrZSL added a comment. Rebase + Move files to other locations due to structure change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137514/new/ https://reviews.llvm.org/D137514 Files: clang-tool

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

2023-03-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503889. PiotrZSL added a comment. Change base-line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145720/new/ https://reviews.llvm.org/D145720 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCapt

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

2023-03-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503907. PiotrZSL added a comment. Improve documentation (review comments) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145720/new/ https://reviews.llvm.org/D145720 Files: clang-tools-extra/clang-tidy/cppc

[PATCH] D145730: [clang-tidy] readability-redundant-string-cstr for smart pointer #576705

2023-03-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. Also consider reducing commit message, instead just copying issue description. Simple description about issue would be sufficient. No functional issues, so LGTM. Comment

[PATCH] D137514: [clang-tidy] add check for capturing lambda coroutines

2023-03-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503939. PiotrZSL added a comment. Making tests passing on this diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137514/new/ https://reviews.llvm.org/D137514 Files: clang-tools-extra/clang-tidy/cppcoregui

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

2023-03-09 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503940. PiotrZSL added a comment. Change baseline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145720/new/ https://reviews.llvm.org/D145720 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptu

[PATCH] D145724: [clang-tidy] Provide default template arguments in

2023-03-10 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/D145724/new/ https://reviews.llvm.org/D145724 ___

[PATCH] D145312: [clang-tidy] Make readability-string-compare check use header

2023-03-10 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/D145312/new/ https://reviews.llvm.org/D145312 ___ cfe-commits mailing list cfe-commi

[PATCH] D145313: [clang-tidy] Make readability-container-size-empty check using header

2023-03-10 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, this is anyway non functional change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145313/new/ https://reviews.llvm.org/D145313 _

[PATCH] D145311: [clang-tidy] Make abseil-redundant-strcat-calls checker use header

2023-03-10 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. It's fine, absl::StrCat returns std::string. So those changes are correct. Here you can find source code https://github.com/abseil/abseil-cpp/blob/master/absl/strings/str_cat.h Repository

[PATCH] D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr

2023-03-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp:189 + getLangOpts().CPlusPlus2b + ? hasAnyName("::std::print", "::std::format") +

[PATCH] D145778: [clang-tidy] Change readability-magic-numbers to allow numbers in type aliases.

2023-03-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp:40 + if (Node.get() || Node.get()) +return true; This should be configurable, someone else may don't want magic numbers in template arguments. So we

[PATCH] D145778: [clang-tidy] Change readability-magic-numbers to allow numbers in type aliases.

2023-03-10 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 is for issue: https://github.com/llvm/llvm-project/issues/61259 Reference it in commit message. Add config: "flag should be added i.e. IgnoreTypeAliases which will default t

[PATCH] D145780: [clang-tidy] Introduce option to allow magic numbers in type aliases

2023-03-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Merge those commits under D145778 , no need for separate review. (git rebase -i HEAD~3) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145780/new/ https://reviews.llvm.org/D145780 ___

[PATCH] D145780: [clang-tidy] Introduce option to allow magic numbers in type aliases

2023-03-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:198 + magic numbers in type aliases such as ``using`` and ``typedef`` declarations if + the new ``IgnoreTypeAliases`` option is set to false. is set to `true`, not false. R

[PATCH] D145778: [clang-tidy] Change readability-magic-numbers to allow numbers in type aliases.

2023-03-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. "Context not available." - use arcanist (just merge all local commits into one), or generate diff with full context (diff -U 999). Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/magic-numbers.rst:58 + + using containerType = C

[PATCH] D145778: [clang-tidy] Change readability-magic-numbers to allow numbers in type aliases.

2023-03-10 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/D145778/new/ https://reviews.llvm.org/D145778 ___ cfe-commits mailing list cfe-commi

[PATCH] D145730: [clang-tidy] readability-redundant-string-cstr for smart pointer #576705

2023-03-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Code is correct, simply this check uses more manual string manipulation. In theory there could be some more issues if `operator ->` wouldn't return pointer, but a class with additional `operator ->`, but that's legacy independent issue. Repository: rG LLVM Github Mo

[PATCH] D145778: [clang-tidy] Change readability-magic-numbers to allow numbers in type aliases.

2023-03-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. What should I put as commit author ? I'm asking because this is diff, and commit author looks to be attached to it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145778/new/ https://reviews.llvm.org/D145778 ___ cfe-

[PATCH] D145730: [clang-tidy] Fix readability-redundant-string-cstr for smart pointer #576705

2023-03-10 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9c8bc090a0c2: [clang-tidy] Fix readability-redundant-string-cstr for smart pointer #576705 (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D145778: [clang-tidy] Change readability-magic-numbers to allow numbers in type aliases.

2023-03-10 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd4b45b93fa56: [clang-tidy] Change readability-magic-numbers to allow numbers in type aliases. (authored by florianhumblot, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D137514: [clang-tidy] add check for capturing lambda coroutines

2023-03-10 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 rG54178fc6161a: [clang-tidy] add check for capturing lambda coroutines (authored by dotnwat, committed by PiotrZSL). Reposi

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

2023-03-10 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG17d403f66443: [clang-tidy] Finish cppcoreguidelines-avoid-capturing-lambda-coroutines check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D144206: [clang-tidy] Fix false-positive in cppcoreguidelines-slicing

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

[PATCH] D144206: [clang-tidy] Fix false-positive in cppcoreguidelines-slicing

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

[PATCH] D144206: [clang-tidy] Fix false-positive in cppcoreguidelines-slicing

2023-03-11 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf1e2469edcfc: [clang-tidy] Fix false-positive in cppcoreguidelines-slicing (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144206/new/

[PATCH] D145311: [clang-tidy][NFC] Make abseil-redundant-strcat-calls checker use header

2023-03-11 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG988355808efc: [clang-tidy][NFC] Make abseil-redundant-strcat-calls checker use header (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr

2023-03-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. "Do you think that the change can land like in its current state first? Or would you prefer that the configuration option is added at the same time?" Code is fine, probably If would would write this, then I would bother to split into C++20 and C++2B simply because `std

[PATCH] D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr

2023-03-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp:189 + getLangOpts().CPlusPlus2b + ? hasAnyName("::std::print", "::std::format") +

[PATCH] D145856: [clang-tidy] Let misc-const-correctness detect auto local variables that can be made const

2023-03-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. - Failed tests - Missing tests for this change - Missing configuration option for this change (changing default behavior) - Missing release notes - Missing documentation update - a

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

2023-03-12 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. - Added support for C++

[PATCH] D49864: [clang-tidy] The script clang-tidy-diff.py doesn't accept 'pass by' options (--)

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Herald added a reviewer: njames93. Herald added a project: All. This need to be rebase due to conflict to land. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49864/new/ https://reviews.llvm.org/D49864 _

[PATCH] D145312: [clang-tidy] Make readability-string-compare check use header

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. In D145312#4187195 , @carlosgalvezp wrote: > @PiotrZSL I believe you have landed some patches of this chain. Would you > mind sharing how you do it? I'm not an expert in Phabricator and simply doing > `arc patch D145312` leads

[PATCH] D145312: [clang-tidy] Make readability-string-compare check use header

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf9dc14cf1f7e: [clang-tidy] Make readability-string-compare check use header (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D145313: [clang-tidy] Make readability-container-size-empty check using header

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0a93abd97658: [clang-tidy] Make readability-container-size-empty check using header (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D145724: [clang-tidy] Provide default template arguments in

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc4918cbf3ba3: [clang-tidy] Provide default template arguments in (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. @ccotter Do we commit this, or you plan to still change something here ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141569/new/ https://reviews.llvm.org/D141569 ___ cfe-commi

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

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 504434. PiotrZSL added a comment. Rebase on top of main + Change llvm::Optional into std::optional Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129070/new/ https://reviews.llvm.org/D129070 Files: clang-too

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

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 50. PiotrZSL added a comment. Review fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145865/new/ https://reviews.llvm.org/D145865 Files: clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cp

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

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 504448. PiotrZSL added a comment. Update documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145865/new/ https://reviews.llvm.org/D145865 Files: clang-tools-extra/clang-tidy/bugprone/ExceptionEscape

[PATCH] D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp:189 + getLangOpts().CPlusPlus2b + ? hasAnyName("::std::print", "::std::format") +

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 504454. PiotrZSL added a comment. Rebase + Fix order of checks in ReleaseNotes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141569/new/ https://reviews.llvm.org/D141569 Files: clang-tools-extra/clang-tidy/

[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18

2023-03-12 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 rGc491c9170239: [clang-tidy] Implement CppCoreGuideline F.18 (authored by ccotter, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHAN

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

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. This change obsoletes D115118 and D134588 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145865/new/ https://reviews.llvm.org/D145865

[PATCH] D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. Correct commit message and this could land. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143342/new/ https://reviews.llvm.org/D143342 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:146-148 + arguments to ``std::print`` and ``std::format``. The same check can be + used for functions that behave similarly by using the + ``StringParameterFunction`` option. `

[PATCH] D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. "The dummy implementations of std::format and std::print require C++20, so it's easier to test them in a separate redundant-string-cstr-format.cpp check file. This also requires a small improvement to the basic_string_view implementation in the dummy header. With these

[PATCH] D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. You will need to rebase this, there are conflicts... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143342/new/ https://reviews.llvm.org/D143342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option

2023-03-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. My only complain is documentation, changes in code and tests are correct. Build failed mainly due to conflicts in previous change. It should get green once prev patch will land, an

[PATCH] D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr

2023-03-12 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 landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG57b78faa9eb0: [clang-tidy] Support std::format and std::print in r

[PATCH] D145856: [clang-tidy] Let misc-const-correctness detect auto local variables that can be made const

2023-03-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Tests: ./clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-transform-values.cpp ./clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-cxx17.cpp ./clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-templates.cpp ./clang-tools-ex

[PATCH] D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option

2023-03-13 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/redundant-string-cstr.rst:18 + or proper overload candidates that can do so should exist. This can be + used to configure functions such as fmt::format, spdlog::logger::info, +

[PATCH] D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option

2023-03-13 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/D145885/new/ https://reviews.llvm.org/D145885 ___

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

2023-03-13 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Thank you for information, I will look into this Indeed test for this scenario is missing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142587/new/ https://reviews.llvm.org/D142587 ___

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

2023-03-13 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. Correct issue when inco

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

2023-03-13 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExprSequence.cpp:67 +llvm::SmallVector +allInitListExprForms(const InitListExpr *InitList) { + llvm::SmallVector result = {InitList}; maybe some other name instead of allInitListExprF

[PATCH] D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option

2023-03-13 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4e901cda725b: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions… (authored by mikecrowe, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D153198: [clang-tidy] Refactor common code from the Noexcept*Checks into `NoexceptFunctionCheck`

2023-06-18 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG845618cf69e8: [clang-tidy] Refactor common code from the Noexcept*Checks into… (authored by AMS21, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D153218: [clang-tidy] Fix `llvmlibc-inline-function-decl` false positives for templated function definitions

2023-06-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. I got one concern, if you write this: template LIBC_INLINE void VariadicTemplate::goodVariadicTemplate() {} template inline void VariadicTemplate::badVariadicTemplate() {}

[PATCH] D153220: [clang-tidy] Improve `performance-move-const-arg` message when no move constructor is available

2023-06-18 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Overall looks ok, Add some test with records being used via typedef. Comment at: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp:117 + bool IsConstArg = ArgType.isConstQualified(); + bool IsTriviallyCopyable = ArgType.isTriviallyCopyab

[PATCH] D153218: [clang-tidy] Fix `llvmlibc-inline-function-decl` false positives for templated function definitions

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

[PATCH] D153220: [clang-tidy] Improve `performance-move-const-arg` message when no move constructor is available

2023-06-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 Comment at: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp:207 + +if (const CXXRecordDecl *RecordDecl = ArgType->getAsCXXRecordDecl(); +

[PATCH] D153220: [clang-tidy] Improve `performance-move-const-arg` message when no move constructor is available

2023-06-18 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. LGTM Comment at: clang-tools-extra/docs/ReleaseNotes.rst:378-379 +- Improved :doc:`performance-move-const-arg + ` check to warn when no move + constructor is available. + NOTE: `check to warn when no

[PATCH] D153218: [clang-tidy] Fix `llvmlibc-inline-function-decl` false positives for templated function definitions

2023-06-18 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc96306db2cad: [clang-tidy] Fix `llvmlibc-inline-function-decl` false positives for templated… (authored by AMS21, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D153220: [clang-tidy] Improve `performance-move-const-arg` message when no move constructor is available

2023-06-18 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 rG82d4dc20efbd: [clang-tidy] Improve `performance-move-const-arg` message when no move… (authored by AMS21, committed by PiotrZSL). Repository: rG

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-06-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. Except readability issues with this check code (bunch of else, ..), and that I didn't took a deep dive into format string conversion (I hope that author is right there). I would say that t

[PATCH] D152764: [clang-tidy] Reserved-identifier: Improved AllowedIdentifiers option to support regular expressions

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

[PATCH] D152764: [clang-tidy] Reserved-identifier: Improved AllowedIdentifiers option to support regular expressions

2023-06-19 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG87a3253a394d: [clang-tidy] Reserved-identifier: Improved AllowedIdentifiers option to support… (authored by felix642, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D152764?v

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

2023-06-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp, isuckatcs, JonasToth, baloghadamsoftware. 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 subs

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

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

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

2023-06-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Question would be, does this can stay +- like this and we could wait with extension this until some users for example complain, that they would like it to be extended, or this need to be done now. Main reason for this change is, that often I run into situation when ther

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

2023-06-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp, isuckatcs, JonasToth, baloghadamsoftware. 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 subs

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

2023-06-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp, isuckatcs, JonasToth, baloghadamsoftware. 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 subs

[PATCH] D152953: [clang-tidy] Introduce fuchsia-global-variables check

2023-06-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/fuchsia/GlobalVariablesCheck.cpp:26 +void GlobalVariablesCheck::registerMatchers(MatchFinder *Finder) { + const auto is_global_or_static_candidate = + allOf(hasGlobalStorage(), isDefinition(), unless(i

[PATCH] D135476: [clang-tidy] Support concepts in `bugprone-forwarding-reference-overload`

2023-06-23 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. May require rebase, but looks fine. Release notes entry should be added. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135476/new/ https://r

<    1   2   3   4   5   6   7   8   9   >